From a2a43983ba6d04d7631fa8be72312696a711a73e Mon Sep 17 00:00:00 2001 From: Jacob Hoffman-Andrews Date: Sat, 6 Feb 2016 02:20:31 -0800 Subject: [PATCH] Remove obsolete event listeners. --- src/components/https-everywhere.js | 42 +----------------------------- 1 file changed, 1 insertion(+), 41 deletions(-) diff --git a/src/components/https-everywhere.js b/src/components/https-everywhere.js index b2ba4a77e39d..6fc1824a3012 100644 --- a/src/components/https-everywhere.js +++ b/src/components/https-everywhere.js @@ -246,8 +246,7 @@ HTTPSEverywhere.prototype = { QueryInterface: XPCOMUtils.generateQI( [ Components.interfaces.nsIObserver, Components.interfaces.nsISupports, - Components.interfaces.nsISupportsWeakReference, - Components.interfaces.nsIChannelEventSink ]), + Components.interfaces.nsISupportsWeakReference ]), wrappedJSObject: null, // Initialized by constructor @@ -642,45 +641,6 @@ HTTPSEverywhere.prototype = { return cohort; }, - // nsIChannelEventSink implementation - // XXX This was here for rewrites in the past. Do we still need it? - onChannelRedirect: function(oldChannel, newChannel, flags) { - const uri = newChannel.URI; - this.log(DBUG,"Got onChannelRedirect to "+uri.spec); - if (!(newChannel instanceof CI.nsIHttpChannel)) { - this.log(DBUG, newChannel + " is not an instance of nsIHttpChannel"); - return; - } - var alist = this.juggleApplicableListsDuringRedirection(oldChannel, newChannel); - HTTPS.replaceChannel(alist, newChannel, this.httpNowhereEnabled); - }, - - juggleApplicableListsDuringRedirection: function(oldChannel, newChannel) { - // If the new channel doesn't yet have a list of applicable rulesets, start - // with the old one because that's probably a better representation of how - // secure the load process was for this page - var browser = this.getBrowserForChannel(oldChannel); - var old_alist = null; - if (browser) - old_alist = this.getExpando(browser,"applicable_rules"); - browser = this.getBrowserForChannel(newChannel); - if (!browser) return null; - var new_alist = this.getExpando(browser,"applicable_rules"); - if (old_alist && !new_alist) { - new_alist = old_alist; - this.setExpando(browser,"applicable_rules",new_alist); - } else if (!new_alist) { - new_alist = new ApplicableList(this.log, browser.currentURI); - this.setExpando(browser,"applicable_rules",new_alist); - } - return new_alist; - }, - - asyncOnChannelRedirect: function(oldChannel, newChannel, flags, callback) { - this.onChannelRedirect(oldChannel, newChannel, flags); - callback.onRedirectVerifyCallback(0); - }, - get_prefs: function(prefBranch) { if(!prefBranch) prefBranch = PREFBRANCH_ROOT;