[tbb-commits] [torbutton/master] Bug 20394: Remove obsolete code

gk at torproject.org gk at torproject.org
Thu Oct 20 08:42:19 UTC 2016


commit 70e5f3b26c7e4d22158b02757681170ac0daadf5
Author: Arthur Edelstein <arthuredelstein at gmail.com>
Date:   Tue Oct 18 11:29:27 2016 -0700

    Bug 20394: Remove obsolete code
---
 src/chrome/content/contents.rdf      | 50 ------------------------------------
 src/chrome/content/torbutton.js      | 23 ++---------------
 src/chrome/content/torbutton_util.js |  8 +-----
 src/chrome/skin/contents.rdf         | 45 --------------------------------
 4 files changed, 3 insertions(+), 123 deletions(-)

diff --git a/src/chrome/content/contents.rdf b/src/chrome/content/contents.rdf
deleted file mode 100644
index c7afa3a..0000000
--- a/src/chrome/content/contents.rdf
+++ /dev/null
@@ -1,50 +0,0 @@
-<!-- Bug 1506 P0: This is old FF2 cruft. It does not need to exist. -->
-<?xml version="1.0"?>
-
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-     xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
-
-    <Seq about="urn:mozilla:package:root">
-        <li resource="urn:mozilla:package:torbutton"/>
-    </Seq>
-    
-    <Description about="urn:mozilla:package:torbutton"
-                 chrome:athor="Scott Squires"
-		 chrome:displayName="Torbutton"
-                 chrome:extension="true"
-                 chrome:name="torbutton">
-    </Description>
-
-    <Seq about="urn:mozilla:overlays">
-        <!-- firefox 0.9 and 1.0 -->
-        <li resource="chrome://browser/content/browser.xul"/>
-        <li resource="chrome://browser/content/pref/pref-connection.xul"/>
-        <!-- thunderbird -->
-        <li resource="chrome://messenger/content/messenger.xul"/>
-        <li resource="chrome://messenger/content/messengercompose/messengercompose.xul"/>
-        <!-- torbutton -->
-	<li resource="chrome://torbutton/content/torbutton.xul"/>
-    </Seq>
-    
-    <!-- firefox 0.9 and 1.0 -->
-    <Seq about="chrome://browser/content/browser.xul">
-        <li>chrome://torbutton/content/torbutton.xul</li>
-    </Seq>
-    <Seq about="chrome://browser/content/pref/pref-connection.xul">
-        <li>chrome://torbutton/content/pref-connection.xul</li>
-    </Seq>
-
-    <!-- thunderbird -->
-    <Seq about="chrome://messenger/content/messenger.xul">
-        <li>chrome://torbutton/content/torbutton_tb.xul</li>
-    </Seq>
-    <Seq about="chrome://messenger/content/messengercompose/messengercompose.xul">
-        <li>chrome://torbutton/content/torbutton_tb.xul</li>
-    </Seq>
-
-    <!-- torbutton -->
-    <Seq about="chrome://torbutton/content/torbutton.xul">
-	<li>chrome://torbutton/content/popup.xul</li>
-    </Seq>
-
-</RDF>
diff --git a/src/chrome/content/torbutton.js b/src/chrome/content/torbutton.js
index 3c05047..d2824cb 100644
--- a/src/chrome/content/torbutton.js
+++ b/src/chrome/content/torbutton.js
@@ -1,4 +1,4 @@
-// Bug 1506 P0-P5: This is the main Torbutton overlay file. Much needs to be
+// Bug 1506 P1-P5: This is the main Torbutton overlay file. Much needs to be
 // preserved here, but in an ideal world, most of this code should perhaps be
 // moved into an XPCOM service, and much can also be tossed. See also
 // individual 1506 comments for details.
@@ -2110,25 +2110,6 @@ function torbutton_open_prefs_dialog() {
   torbutton_log(2, 'opened preferences window');
 }
 
-// Bug 1506 P0: Support code for checking Firefox versions. Not needed.
-function torbutton_gecko_compare(aVersion) {
-    var ioService = Components.classes["@mozilla.org/network/io-service;1"]
-                    .getService(Components.interfaces.nsIIOService);
-    var httpProtocolHandler = ioService.getProtocolHandler("http")
-                              .QueryInterface(Components.interfaces.nsIHttpProtocolHandler);
-    var versionComparator = null;
-
-    if ("nsIVersionComparator" in Components.interfaces) {
-        versionComparator = Components.classes["@mozilla.org/xpcom/version-comparator;1"]
-                            .getService(Components.interfaces.nsIVersionComparator);
-    } else {
-        versionComparator = Components.classes["@mozilla.org/updates/version-checker;1"]
-                            .getService(Components.interfaces.nsIVersionChecker);
-    }
-    var geckoVersion = httpProtocolHandler.misc.match(/rv:([0-9.]+)/)[1];
-    return versionComparator.compare(aVersion, geckoVersion);
-}
-
 // -------------- HISTORY & COOKIES ---------------------
 
 // Bug 1506 P4: Used by New Identity if cookie protections are
@@ -2321,7 +2302,7 @@ function torbutton_do_startup()
     }
 }
 
-// Bug 1506 P0: Perform version check when a new tab is opened.
+// Perform version check when a new tab is opened.
 function torbutton_new_tab(event)
 {
     // listening for new tabs
diff --git a/src/chrome/content/torbutton_util.js b/src/chrome/content/torbutton_util.js
index f1263f1..e6de768 100644
--- a/src/chrome/content/torbutton_util.js
+++ b/src/chrome/content/torbutton_util.js
@@ -1,4 +1,4 @@
-// Bug 1506 P0-P3: These utility functions might be useful, but 
+// Bug 1506 P1-P3: These utility functions might be useful, but
 // you probably just want to rewrite them or use the underlying
 // code directly. I don't see any of them as essential for 1506,
 // really.
@@ -8,12 +8,6 @@ var m_tb_torlog = Components.classes["@torproject.org/torbutton-logger;1"]
 
 var m_tb_string_bundle = torbutton_get_stringbundle();
 
-// Bug 1506 P0: Use the log service directly
-function torbutton_eclog(nLevel, sMsg) {
-    m_tb_torlog.eclog(nLevel, sMsg);
-    return true;
-}
-
 function torbutton_safelog(nLevel, sMsg, scrub) {
     m_tb_torlog.safe_log(nLevel, sMsg, scrub);
     return true;
diff --git a/src/chrome/skin/contents.rdf b/src/chrome/skin/contents.rdf
deleted file mode 100644
index 53bde17..0000000
--- a/src/chrome/skin/contents.rdf
+++ /dev/null
@@ -1,45 +0,0 @@
-<!-- Bug 1506 P0: This is old FF2 cruft. It does not need to exist. -->
-<?xml version="1.0"?>
-
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-     xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
-
-    <Seq about="urn:mozilla:skin:root">
-        <li resource="urn:mozilla:skin:classic/1.0"/>
-    </Seq>
-  
-    <Description about="urn:mozilla:skin:classic/1.0">
-        <chrome:packages>
-            <Seq about="urn:mozilla:skin:classic/1.0:packages">
-                <li resource="urn:mozilla:skin:classic/1.0:torbutton"/>
-            </Seq>
-        </chrome:packages>
-    </Description>
-
-    <Seq about="urn:mozilla:stylesheets">
-        <li resource="chrome://global/content/customizeToolbar.xul"/>
-        <!-- firefox --> 
-        <li resource="chrome://browser/content/browser.xul"/>
-        <!-- thunderbird -->
-        <li resource="chrome://messenger/content/messenger.xul"/>
-        <li resource="chrome://messenger/content/messengercompose/messengercompose.xul"/>
-    </Seq>
-
-    <Seq about="chrome://global/content/customizeToolbar.xul">
-        <li>chrome://torbutton/skin/torbutton.css</li>
-    </Seq>
-
-    <!-- firefox -->  
-    <Seq about="chrome://browser/content/browser.xul">
-        <li>chrome://torbutton/skin/torbutton.css</li>
-    </Seq>
-
-    <!-- thunderbird -->
-    <Seq about="chrome://messenger/content/messenger.xul">
-        <li>chrome://torbutton/skin/torbutton.css</li>
-    </Seq>
-    <Seq about="chrome://messenger/content/messengercompose/messengercompose.xul">
-        <li>chrome://torbutton/skin/torbutton.css</li>
-    </Seq>
-
-</RDF>



More information about the tbb-commits mailing list