☠☠ backed out by ad08d9064a7d ☠ ☠ | |
author | Chris H-C <chutten@mozilla.com> |
Fri, 13 Oct 2017 16:17:18 -0400 (2017-10-13) | |
changeset 388765 | e1f34ba9cecc93f5e44c4d91c50929d46d4a59b2 |
parent 388764 | e7f095ae94d8ac5583248e56d1e3cb995600b0ca |
child 388766 | 15d959b9123e45fd13645866199e5046fd6c2ae5 |
push id | 32758 |
push user | archaeopteryx@coole-files.de |
push date | Fri, 27 Oct 2017 21:31:24 +0000 (2017-10-27) |
treeherder | mozilla-central@d58424c244c3 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | froydnj |
bugs | 1406391 |
milestone | 58.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
|
--- a/modules/libpref/Preferences.cpp +++ b/modules/libpref/Preferences.cpp @@ -4770,16 +4770,17 @@ pref_InitInitialObjects() } } } rv = pref_LoadPrefsInDirList(NS_APP_PREFS_DEFAULTS_DIR_LIST); 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 // are testing final release builds don't flipflop defaults. if (Preferences::GetDefaultType(kTelemetryPref) == nsIPrefBranch::PREF_INVALID) { bool prerelease = false; #ifdef MOZ_TELEMETRY_ON_BY_DEFAULT @@ -4788,16 +4789,29 @@ pref_InitInitialObjects() nsAutoCString prefValue; Preferences::GetDefaultCString(kChannelPref, prefValue); if (prefValue.EqualsLiteral("beta")) { 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. + 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, NS_PREFSERVICE_APPDEFAULTS_TOPIC_ID); nsCOMPtr<nsIObserverService> observerService = mozilla::services::GetObserverService(); NS_ENSURE_SUCCESS(rv, Err("GetObserverService() failed (2)"));