Verified Commit 8082f828 authored by cypherpunks1's avatar cypherpunks1 Committed by Pier Angelo Vendrame
Browse files

Bug 41565: Gate Telemetry Tasks behind MOZ_TELEMETRY_REPORTING

parent 99fe182e
Loading
Loading
Loading
Loading
+1 −0
Changes for browser/base/content/browser.js: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -5984,6 +5984,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")
    ) {
+12 −2
Changes for browser/components/BrowserGlue.jsm: 12 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -1693,7 +1693,9 @@ BrowserGlue.prototype = {
    this._firstWindowTelemetry(aWindow);
    this._firstWindowLoaded();

    if (AppConstants.MOZ_TELEMETRY_REPORTING) {
      this._collectStartupConditionsTelemetry();
    }

    // Set the default favicon size for UI views that use the page-icon protocol.
    PlacesUtils.favicons.setDefaultIconURIPreferredSize(
@@ -2875,13 +2877,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) {
+2 −0
Changes for toolkit/components/telemetry/app/TelemetryEnvironment.jsm: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -973,7 +973,9 @@ function EnvironmentCache() {
  p.push(this._addonBuilder.init());

  this._currentEnvironment.profile = {};
  if (AppConstants.MOZ_TELEMETRY_REPORTING) {
    p.push(this._updateProfile());
  }
  if (AppConstants.MOZ_BUILD_APP == "browser") {
    p.push(this._loadAttributionAsync());
  }