From 498300f9edd9acccb605f9daaa537ca6879960b4 Mon Sep 17 00:00:00 2001 From: Christoph Kerschbaumer Date: Tue, 17 Feb 2015 19:53:53 -0800 Subject: [PATCH] Bug 1116278 - Follow up: Using new channel API in browser/components/feeds (r=sicking) --- browser/components/feeds/FeedConverter.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/browser/components/feeds/FeedConverter.js b/browser/components/feeds/FeedConverter.js index e7c2d8439d9..75115cc94d1 100644 --- a/browser/components/feeds/FeedConverter.js +++ b/browser/components/feeds/FeedConverter.js @@ -548,15 +548,12 @@ GenericProtocolHandler.prototype = { return uri; }, - newChannel: function GPH_newChannel(aUri) { + newChannel2: function GPH_newChannel(aUri, aLoadInfo) { var inner = aUri.QueryInterface(Ci.nsINestedURI).innerURI; var channel = Cc["@mozilla.org/network/io-service;1"]. - getService(Ci.nsIIOService).newChannelFromURI2(inner, - null, // aLoadingNode - Services.scriptSecurityManager.getSystemPrincipal(), - null, // aTriggeringPrincipal - Ci.nsILoadInfo.SEC_NORMAL, - Ci.nsIContentPolicy.TYPE_OTHER); + getService(Ci.nsIIOService). + newChannelFromURIWithLoadInfo(inner, aLoadInfo); + if (channel instanceof Components.interfaces.nsIHttpChannel) // Set this so we know this is supposed to be a feed channel.setRequestHeader("X-Moz-Is-Feed", "1", false); @@ -564,6 +561,7 @@ GenericProtocolHandler.prototype = { return channel; }, + QueryInterface: function GPH_QueryInterface(iid) { if (iid.equals(Ci.nsIProtocolHandler) || iid.equals(Ci.nsISupports))