[tbb-commits] [Git][tpo/applications/tor-browser][base-browser-102.7.0esr-12.5-1] 5 commits: fixup! Bug 31740: Remove some unnecessary RemoteSettings instances

Pier Angelo Vendrame (@pierov) git at gitlab.torproject.org
Thu Jan 26 18:25:47 UTC 2023



Pier Angelo Vendrame pushed to branch base-browser-102.7.0esr-12.5-1 at The Tor Project / Applications / Tor Browser


Commits:
0ee79644 by cypherpunks1 at 2023-01-26T19:25:07+01:00
fixup! Bug 31740: Remove some unnecessary RemoteSettings instances

Disable activity stream

- - - - -
ca88729a by cypherpunks1 at 2023-01-26T19:25:15+01:00
fixup! Bug 40002: Remove about:ion

Remove this._monitorIonPref() and this._monitorIonStudies() from BrowserGlue

- - - - -
125e7f8f by cypherpunks1 at 2023-01-26T19:25:15+01:00
fixup! Firefox preference overrides.

Disable toolkit.telemetry.enabled on all builds, set webextensions.storage.sync.enabled to false

- - - - -
84ab5401 by cypherpunks1 at 2023-01-26T19:25:34+01:00
Bug 41565: Gate Telemetry Tasks behind MOZ_TELEMETRY_REPORTING

- - - - -
de007ee5 by Pier Angelo Vendrame at 2023-01-26T19:25:34+01:00
fixup! Firefox preference overrides.

Document why we are locking toolkit.telemetry.enabled.

- - - - -


5 changed files:

- browser/app/profile/001-base-profile.js
- browser/base/content/browser.js
- browser/components/BrowserGlue.jsm
- toolkit/components/telemetry/app/TelemetryEnvironment.jsm
- toolkit/xre/nsAppRunner.cpp


Changes:

=====================================
browser/app/profile/001-base-profile.js
=====================================
@@ -119,7 +119,8 @@ pref("datareporting.healthreport.uploadEnabled", false);
 pref("datareporting.policy.dataSubmissionEnabled", false);
 // Make sure Unified Telemetry is really disabled, see: #18738.
 pref("toolkit.telemetry.unified", false);
-pref("toolkit.telemetry.enabled", false);
+// This needs to be locked, or nightly builds will automatically lock it to true
+pref("toolkit.telemetry.enabled", false, locked);
 pref("toolkit.telemetry.server", "data:,");
 pref("toolkit.telemetry.archive.enabled", false);
 pref("toolkit.telemetry.updatePing.enabled", false); // Make sure updater telemetry is disabled; see #25909.
@@ -422,6 +423,8 @@ pref("extensions.postDownloadThirdPartyPrompt", false);
 // Therefore, do not allow download of additional language packs. They are not a
 // privacy/security threat, we are disabling them for UX reasons. See bug 41377.
 pref("intl.multilingual.downloadEnabled", false);
+// Disk activity: Disable storage.sync (tor-browser#41424)
+pref("webextensions.storage.sync.enabled", false);
 
 // Toolbar layout
 pref("browser.uiCustomization.state", "{\"placements\":{\"widget-overflow-fixed-list\":[],\"PersonalToolbar\":[\"personal-bookmarks\"],\"nav-bar\":[\"back-button\",\"forward-button\",\"stop-reload-button\",\"urlbar-container\",\"security-level-button\",\"new-identity-button\",\"downloads-button\"],\"TabsToolbar\":[\"tabbrowser-tabs\",\"new-tab-button\",\"alltabs-button\"],\"toolbar-menubar\":[\"menubar-items\"],\"PanelUI-contents\":[\"home-button\",\"edit-controls\",\"zoom-controls\",\"new-window-button\",\"save-page-button\",\"print-button\",\"bookmarks-menu-button\",\"history-panelmenu\",\"find-button\",\"preferences-button\",\"add-ons-button\",\"developer-button\"],\"addon-bar\":[\"addonbar-closebutton\",\"status-bar\"]},\"seen\":[\"developer-button\"],\"dirtyAreaCache\":[\"PersonalToolbar\",\"nav-bar\",\"TabsToolbar\",\"toolbar-menubar\"],\"currentVersion\":14,\"newElementCount\":1}");


=====================================
browser/base/content/browser.js
=====================================
@@ -6004,6 +6004,7 @@ var TabsProgressListener = {
   onStateChange(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
     // Collect telemetry data about tab load times.
     if (
+      AppConstants.MOZ_TELEMETRY_REPORTING &&
       aWebProgress.isTopLevel &&
       (!aRequest.originalURI || aRequest.originalURI.scheme != "about")
     ) {


=====================================
browser/components/BrowserGlue.jsm
=====================================
@@ -22,9 +22,6 @@ XPCOMUtils.defineLazyModuleGetters(this, {
   ActorManagerParent: "resource://gre/modules/ActorManagerParent.jsm",
   AddonManager: "resource://gre/modules/AddonManager.jsm",
   AppMenuNotifications: "resource://gre/modules/AppMenuNotifications.jsm",
-  ASRouterDefaultConfig:
-    "resource://activity-stream/lib/ASRouterDefaultConfig.jsm",
-  ASRouterNewTabHook: "resource://activity-stream/lib/ASRouterNewTabHook.jsm",
   ASRouter: "resource://activity-stream/lib/ASRouter.jsm",
   AsyncShutdown: "resource://gre/modules/AsyncShutdown.jsm",
   BackgroundUpdate: "resource://gre/modules/BackgroundUpdate.jsm",
@@ -717,27 +714,6 @@ let JSWINDOWACTORS = {
     matches: ["about:studies*"],
   },
 
-  ASRouter: {
-    parent: {
-      moduleURI: "resource:///actors/ASRouterParent.jsm",
-    },
-    child: {
-      moduleURI: "resource:///actors/ASRouterChild.jsm",
-      events: {
-        // This is added so the actor instantiates immediately and makes
-        // methods available to the page js on load.
-        DOMDocElementInserted: {},
-      },
-    },
-    matches: [
-      "about:home*",
-      "about:newtab*",
-      "about:welcome*",
-      "about:privatebrowsing",
-    ],
-    remoteTypes: ["privilegedabout"],
-  },
-
   SwitchDocumentDirection: {
     child: {
       moduleURI: "resource:///actors/SwitchDocumentDirectionChild.jsm",
@@ -1693,7 +1669,9 @@ BrowserGlue.prototype = {
     this._firstWindowTelemetry(aWindow);
     this._firstWindowLoaded();
 
-    this._collectStartupConditionsTelemetry();
+    if (AppConstants.MOZ_TELEMETRY_REPORTING) {
+      this._collectStartupConditionsTelemetry();
+    }
 
     // Set the default favicon size for UI views that use the page-icon protocol.
     PlacesUtils.favicons.setDefaultIconURIPreferredSize(
@@ -2006,7 +1984,6 @@ BrowserGlue.prototype = {
       () => NewTabUtils.uninit(),
       () => Normandy.uninit(),
       () => RFPHelper.uninit(),
-      () => ASRouterNewTabHook.destroy(),
       () => UpdateListener.reset(),
     ];
 
@@ -2347,8 +2324,6 @@ BrowserGlue.prototype = {
     this._monitorScreenshotsPref();
     this._monitorWebcompatReporterPref();
     this._monitorHTTPSOnlyPref();
-    this._monitorIonPref();
-    this._monitorIonStudies();
     this._setupSearchDetection();
 
     this._monitorGPCPref();
@@ -2717,12 +2692,6 @@ BrowserGlue.prototype = {
         },
       },
 
-      {
-        task: () => {
-          ASRouterNewTabHook.createInstance(ASRouterDefaultConfig());
-        },
-      },
-
       {
         condition: AppConstants.MOZ_UPDATE_AGENT,
         task: () => {
@@ -2877,13 +2846,21 @@ BrowserGlue.prototype = {
         }
       },
 
-      () => BrowserUsageTelemetry.reportProfileCount(),
+      () => {
+        if (AppConstants.MOZ_TELEMETRY_REPORTING) {
+          BrowserUsageTelemetry.reportProfileCount();
+        }
+      },
 
       () => OsEnvironment.reportAllowedAppSources(),
 
       () => Services.search.runBackgroundChecks(),
 
-      () => BrowserUsageTelemetry.reportInstallationTelemetry(),
+      () => {
+        if (AppConstants.MOZ_TELEMETRY_REPORTING) {
+          BrowserUsageTelemetry.reportInstallationTelemetry();
+        }
+      },
     ];
 
     for (let task of idleTasks) {


=====================================
toolkit/components/telemetry/app/TelemetryEnvironment.jsm
=====================================
@@ -973,7 +973,9 @@ function EnvironmentCache() {
   p.push(this._addonBuilder.init());
 
   this._currentEnvironment.profile = {};
-  p.push(this._updateProfile());
+  if (AppConstants.MOZ_TELEMETRY_REPORTING) {
+    p.push(this._updateProfile());
+  }
   if (AppConstants.MOZ_BUILD_APP == "browser") {
     p.push(this._loadAttributionAsync());
   }


=====================================
toolkit/xre/nsAppRunner.cpp
=====================================
@@ -2800,7 +2800,9 @@ static ReturnAbortOnError ProfileLockedDialog(nsIFile* aProfileDir,
   rv = xpcom.Initialize();
   NS_ENSURE_SUCCESS(rv, rv);
 
+#if defined(MOZ_TELEMETRY_REPORTING)
   if (aProfileDir) mozilla::Telemetry::WriteFailedProfileLock(aProfileDir);
+#endif
 
   rv = xpcom.SetWindowCreator(aNative);
   NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE);



View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/69be75e310d1b4a9b5b5d68c34191d39314b5cca...de007ee5ac03f6eab8dbec02236c74db5045d84b

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/69be75e310d1b4a9b5b5d68c34191d39314b5cca...de007ee5ac03f6eab8dbec02236c74db5045d84b
You're receiving this email because of your account on gitlab.torproject.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tbb-commits/attachments/20230126/b6333c74/attachment-0001.htm>


More information about the tbb-commits mailing list