Bug 728168 - Replace old synchronous favicons calls in feeds. r=mak

This commit is contained in:
Paolo Amadini 2012-04-27 15:05:34 +02:00
parent b03aa5460e
commit 52c0fd1e94
2 changed files with 3 additions and 4 deletions

View File

@ -1366,7 +1366,7 @@ FeedWriter.prototype = {
} }
var faviconURI = makeURI(readerURI.prePath + "/favicon.ico"); var faviconURI = makeURI(readerURI.prePath + "/favicon.ico");
var self = this; var self = this;
this._faviconService.setAndLoadFaviconForPage(readerURI, faviconURI, false, this._faviconService.setAndFetchFaviconForPage(readerURI, faviconURI, false,
function (aURI, aDataLen, aData, aMimeType) { function (aURI, aDataLen, aData, aMimeType) {
if (aDataLen > 0) { if (aDataLen > 0) {
var dataURL = "data:" + aMimeType + ";base64," + var dataURL = "data:" + aMimeType + ";base64," +

View File

@ -448,9 +448,8 @@ WebContentConverterRegistrar.prototype = {
// Now Ask the user and provide the proper callback // Now Ask the user and provide the proper callback
message = this._getFormattedString("addProtocolHandler", message = this._getFormattedString("addProtocolHandler",
[aTitle, uri.host, aProtocol]); [aTitle, uri.host, aProtocol]);
var fis = Cc["@mozilla.org/browser/favicon-service;1"].
getService(Ci.nsIFaviconService); var notificationIcon = uri.prePath + "/favicon.ico";
var notificationIcon = fis.getFaviconLinkForIcon(uri);
var notificationValue = "Protocol Registration: " + aProtocol; var notificationValue = "Protocol Registration: " + aProtocol;
var addButton = { var addButton = {
label: this._getString("addProtocolHandlerAddButton"), label: this._getString("addProtocolHandlerAddButton"),