Bug 1412845 - Whitelist the "default" channel in Prferences.cpp. r=chutten
authorAlessio Placitelli <alessio.placitelli@gmail.com>
Tue, 31 Oct 2017 08:53:32 +0100
changeset 389412 4c27ce0056bf8ec24413e149ea460dabc1d69da7
parent 389411 e33f91893d88b23184152223ca9a293f9215edb8
child 389413 51c759b72e9a172eae173f52fc7f7fc4b6a6b631
push id96855
push userarchaeopteryx@coole-files.de
push dateTue, 31 Oct 2017 23:40:37 +0000
treeherdermozilla-inbound@285362745f60 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschutten
bugs1412845
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1412845 - Whitelist the "default" channel in Prferences.cpp. r=chutten This is needed for local developer builds to enable extended telemetry recording by default. As a consequence, other subsystems relying on this prefs will turn on (e.g. experiments, BHR, ...). MozReview-Commit-ID: W3RarufCdY
modules/libpref/Preferences.cpp
--- a/modules/libpref/Preferences.cpp
+++ b/modules/libpref/Preferences.cpp
@@ -4780,20 +4780,28 @@ pref_InitInitialObjects()
       prerelease = true;
     }
 #endif
     PREF_SetBoolPref(kTelemetryPref, prerelease, true);
   }
 #else
   // For platforms with Unified Telemetry (here meaning not-Android),
   // toolkit.telemetry.enabled determines whether we send "extended" data.
-  // We only want extended data from pre-release channels due to size.
+  // We only want extended data from pre-release channels due to size. We
+  // also want it to be recorded for local developer builds (non-official builds
+  // on the "default" channel).
+  bool developerBuild = false;
+#ifndef MOZILLA_OFFICIAL
+  developerBuild = !strcmp(NS_STRINGIFY(MOZ_UPDATE_CHANNEL), "default");
+#endif
+
   if (!strcmp(NS_STRINGIFY(MOZ_UPDATE_CHANNEL), "nightly") ||
       !strcmp(NS_STRINGIFY(MOZ_UPDATE_CHANNEL), "aurora") ||
-      !strcmp(NS_STRINGIFY(MOZ_UPDATE_CHANNEL), "beta")) {
+      !strcmp(NS_STRINGIFY(MOZ_UPDATE_CHANNEL), "beta") ||
+      developerBuild) {
     PREF_SetBoolPref(kTelemetryPref, true, true);
   } else {
     PREF_SetBoolPref(kTelemetryPref, false, true);
   }
   PREF_LockPref(kTelemetryPref, true);
 #endif // MOZ_WIDGET_ANDROID
 
   NS_CreateServicesFromCategory(NS_PREFSERVICE_APPDEFAULTS_TOPIC_ID,