зеркало из https://github.com/mozilla/gecko-dev.git
Bug 761319 Use a more reliable way of resolving the feed handler URI r=gavin
This commit is contained in:
Родитель
5f989addb3
Коммит
bf2f971a94
|
@ -51,7 +51,7 @@ const TYPE_MAYBE_FEED = "application/vnd.mozilla.maybe.feed";
|
|||
const TYPE_MAYBE_AUDIO_FEED = "application/vnd.mozilla.maybe.audio.feed";
|
||||
const TYPE_MAYBE_VIDEO_FEED = "application/vnd.mozilla.maybe.video.feed";
|
||||
const URI_BUNDLE = "chrome://browser/locale/feeds/subscribe.properties";
|
||||
const SUBSCRIBE_PAGE_URI = "chrome://browser/content/feeds/subscribe.xhtml";
|
||||
const FEEDHANDLER_URI = "about:feeds";
|
||||
|
||||
const PREF_SELECTED_APP = "browser.feeds.handlers.application";
|
||||
const PREF_SELECTED_WEB = "browser.feeds.handlers.webservice";
|
||||
|
@ -673,7 +673,7 @@ FeedWriter.prototype = {
|
|||
*/
|
||||
_getFileIconURL: function FW__getFileIconURL(file) {
|
||||
var ios = Cc["@mozilla.org/network/io-service;1"].
|
||||
getService(Components.interfaces.nsIIOService);
|
||||
getService(Ci.nsIIOService);
|
||||
var fph = ios.getProtocolHandler("file")
|
||||
.QueryInterface(Ci.nsIFileProtocolHandler);
|
||||
var urlSpec = fph.getURLSpecFromFile(file);
|
||||
|
@ -1089,10 +1089,9 @@ FeedWriter.prototype = {
|
|||
getInterface(Ci.nsIWebNavigation).
|
||||
QueryInterface(Ci.nsIDocShell).currentDocumentChannel;
|
||||
|
||||
var uri = makeURI(SUBSCRIBE_PAGE_URI);
|
||||
var resolvedURI = Cc["@mozilla.org/chrome/chrome-registry;1"].
|
||||
getService(Ci.nsIChromeRegistry).
|
||||
convertChromeURL(uri);
|
||||
var resolvedURI = Cc["@mozilla.org/network/io-service;1"].
|
||||
getService(Ci.nsIIOService).
|
||||
newChannel(FEEDHANDLER_URI, null, null).URI;
|
||||
|
||||
if (resolvedURI.equals(chan.URI))
|
||||
return chan.originalURI;
|
||||
|
|
Загрузка…
Ссылка в новой задаче