mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 23:35:34 +00:00
bug 1406391 - Lock toolkit.telemetry.enabled based on channel r=froydnj
In Unified Telemetry toolkit.telemetry.enabled controls whether we send base collection data or extended collection. The difference is mostly in volume, not in kind (though extended collection has a little stricter testing and monitoring requirements). Since the Preferences UI change in Firefox 56, users no longer have the ability to change toolkit.telemetry.enabled. This is a good thing as for pre-release users very few disabled extended collection, and even fewer release users enabled it. This provides uniform collection based on channel which should eventually net us some efficiencies. Until then we need to align our use of the toolkit.telemetry.enabled pref with the UI change that has already shipped. This is accomplished by locking t.t.e to 'true' on pre-release channels and locking it to 'false' on everything else. This doesn't apply to Android as it doesn't (yet) use Unified Telemetry. t.t.e means something rather different there. MozReview-Commit-ID: EOpWm8b0jWA
This commit is contained in:
parent
42a983ba76
commit
be62507aa8
@ -4775,6 +4775,7 @@ pref_InitInitialObjects()
|
||||
NS_ENSURE_SUCCESS(
|
||||
rv, Err("pref_LoadPrefsInDirList(NS_APP_PREFS_DEFAULTS_DIR_LIST) failed"));
|
||||
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
// Set up the correct default for toolkit.telemetry.enabled. If this build
|
||||
// has MOZ_TELEMETRY_ON_BY_DEFAULT *or* we're on the beta channel, telemetry
|
||||
// is on by default, otherwise not. This is necessary so that beta users who
|
||||
@ -4793,6 +4794,19 @@ pref_InitInitialObjects()
|
||||
#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.
|
||||
if (!strcmp(NS_STRINGIFY(MOZ_UPDATE_CHANNEL), "nightly") ||
|
||||
!strcmp(NS_STRINGIFY(MOZ_UPDATE_CHANNEL), "aurora") ||
|
||||
!strcmp(NS_STRINGIFY(MOZ_UPDATE_CHANNEL), "beta")) {
|
||||
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,
|
||||
nullptr,
|
||||
|
Loading…
Reference in New Issue
Block a user