[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [torbutton/master] Remove aboutTor component



commit 5b13748cdf2af2db9e829cf76e52287fb2eb2445
Author: Alex Catarineu <acat@xxxxxxxxxxxxxx>
Date:   Tue May 28 15:15:36 2019 +0200

    Remove aboutTor component
---
 components/aboutTor.js         | 53 ------------------------------------------
 components/startup-observer.js |  7 ------
 2 files changed, 60 deletions(-)

diff --git a/components/aboutTor.js b/components/aboutTor.js
deleted file mode 100644
index ec48d668..00000000
--- a/components/aboutTor.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/*************************************************************************
- * Copyright (c) 2017, The Tor Project, Inc.
- * See LICENSE for licensing information.
- *
- * vim: set sw=2 sts=2 ts=8 et syntax=javascript:
- *
- * about:tor component
- *************************************************************************/
-
-// Module specific constants
-const kMODULE_NAME = "about:tor";
-const kMODULE_CONTRACTID = "@mozilla.org/network/protocol/about;1?what=tor";
-const kMODULE_CID = Components.ID("84d47da6-79c3-4661-aa9f-8049476f7bf5");
-
-const kAboutTorURL = "chrome://torbutton/content/aboutTor/aboutTor.xhtml";
-
-const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-function AboutTor() {}
-
-
-AboutTor.prototype =
-{
-  QueryInterface: ChromeUtils.generateQI([Ci.nsIAboutModule]),
-
-  // nsIClassInfo implementation:
-  classDescription: kMODULE_NAME,
-  classID: kMODULE_CID,
-  contractID: kMODULE_CONTRACTID,
-
-  // nsIAboutModule implementation:
-  newChannel(aURI, aLoadInfo) {
-    let ioSvc = Services.io;
-    let uri = ioSvc.newURI(kAboutTorURL);
-    let channel = ioSvc.newChannelFromURIWithLoadInfo(uri, aLoadInfo);
-    channel.originalURI = aURI;
-
-    return channel;
-  },
-
-  getURIFlags: function(aURI)
-  {
-    return Ci.nsIAboutModule.URI_SAFE_FOR_UNTRUSTED_CONTENT |
-           Ci.nsIAboutModule.URI_MUST_LOAD_IN_CHILD |
-           Ci.nsIAboutModule.ALLOW_SCRIPT;
-  }
-};
-
-
-let factory = XPCOMUtils._getFactory(AboutTor);
-let reg = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
-reg.registerFactory(kMODULE_CID, "", kMODULE_CONTRACTID, factory);
diff --git a/components/startup-observer.js b/components/startup-observer.js
index 2d20a8ad..eea9e8db 100644
--- a/components/startup-observer.js
+++ b/components/startup-observer.js
@@ -62,13 +62,6 @@ function StartupObserver() {
     } catch(e) {
       this.logger.log(4, "Early proxy change failed. Will try again at profile load. Error: "+e);
     }
-
-    // Arrange for our about:tor handler to be loaded in the default (chrome)
-    // process as well as in each content process.
-    let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
-                 .getService(Ci.nsIProcessScriptLoader);
-    ppmm.loadProcessScript("resource://torbutton/components/aboutTor.js",
-                            true);
 }
 
 StartupObserver.prototype = {



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits