[tbb-commits] [tor-browser/tor-browser-78.5.0esr-10.5-1] Bug 28044: Integrate Tor Launcher into tor-browser

sysrqb at torproject.org sysrqb at torproject.org
Sat Nov 14 17:52:08 UTC 2020


commit 97c3552b5e90d198c17302e55e81e260c4cd5c5c
Author: Kathy Brade <brade at pearlcrescent.com>
Date:   Tue Feb 26 10:07:17 2019 -0500

    Bug 28044: Integrate Tor Launcher into tor-browser
    
    Build and package Tor Launcher as part of the browser (similar to
    how pdfjs is handled).
    
    If a Tor Launcher extension is present in the user's profile, it is
    removed.
---
 browser/extensions/moz.build                        |  5 +++++
 browser/installer/package-manifest.in               |  5 +++++
 toolkit/mozapps/extensions/internal/XPIProvider.jsm | 10 ++++++++++
 3 files changed, 20 insertions(+)

diff --git a/browser/extensions/moz.build b/browser/extensions/moz.build
index 4c9fa789d12a..fd2e65d01f02 100644
--- a/browser/extensions/moz.build
+++ b/browser/extensions/moz.build
@@ -12,3 +12,8 @@ DIRS += [
     'webcompat',
     'report-site-issue'
 ]
+
+if not CONFIG['TOR_BROWSER_DISABLE_TOR_LAUNCHER']:
+    DIRS += [
+        'tor-launcher',
+    ]
diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
index 7deaf1b51f9a..582a6e13d607 100644
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -248,6 +248,11 @@
 @RESPATH@/browser/chrome/browser.manifest
 @RESPATH@/browser/chrome/pdfjs.manifest
 @RESPATH@/browser/chrome/pdfjs/*
+#ifndef TOR_BROWSER_DISABLE_TOR_LAUNCHER
+ at RESPATH@/browser/chrome/torlauncher.manifest
+ at RESPATH@/browser/chrome/torlauncher/*
+ at RESPATH@/browser/@PREF_DIR@/torlauncher-prefs.js
+#endif
 @RESPATH@/chrome/toolkit at JAREXT@
 @RESPATH@/chrome/toolkit.manifest
 @RESPATH@/chrome/recording.manifest
diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.jsm b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
index ba67e5f6bee8..bcdf6f40d5ed 100644
--- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
@@ -1462,6 +1462,16 @@ var XPIStates = {
       for (let [id, file] of loc.readAddons()) {
         knownIds.delete(id);
 
+        // Since it is now part of the browser, uninstall the Tor Launcher
+        // extension. This will remove the Tor Launcher .xpi from user
+        // profiles on macOS.
+        if (id === "tor-launcher at torproject.org") {
+          logger.debug("Uninstalling the Tor Launcher extension.");
+          loc.installer.uninstallAddon(id);
+          changed = true;
+          continue;
+        }
+
         let xpiState = loc.get(id);
         if (!xpiState) {
           // If the location is not supported for sideloading, skip new





More information about the tbb-commits mailing list