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
--- 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,