Bug 1572582 - Merge datareporting-prefs.js into all.js. r=chutten
authorNicholas Nethercote <nnethercote@mozilla.com>
Sun, 11 Aug 2019 23:31:12 +0000
changeset 487398 3b8914e0ccdee2fe9969aef9005f786a9b6d2838
parent 487397 5c879cc0473ca4ff19898d3016292c56299aded3
child 487399 c6e2e040e385d76318dfd0eb32c935ef3452da5e
push id36420
push useraiakab@mozilla.com
push dateMon, 12 Aug 2019 09:55:30 +0000
treeherdermozilla-central@f719a2df1b96 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschutten
bugs1572582
milestone70.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 1572582 - Merge datareporting-prefs.js into all.js. r=chutten This makes prefs definition simpler, more consistent, and less error-prone. Differential Revision: https://phabricator.services.mozilla.com/D41298
.prettierignore
modules/libpref/greprefs.js
modules/libpref/init/all.js
toolkit/components/telemetry/datareporting-prefs.js
--- a/.prettierignore
+++ b/.prettierignore
@@ -26,17 +26,16 @@ mobile/android/installer/mobile-l10n.js
 modules/libpref/init/all.js
 modules/libpref/test/unit/data/testParser.js
 modules/libpref/test/unit/data/testPrefLocked.js
 modules/libpref/test/unit/data/testPrefSticky.js
 modules/libpref/test/unit/extdata/testExt.js
 remote/pref/remote.js
 services/sync/tests/unit/prefs_test_prefs_store.js
 testing/marionette/prefs/marionette.js
-toolkit/components/telemetry/datareporting-prefs.js
 toolkit/components/telemetry/healthreport-prefs.js
 
 # Ignore testing pref files which aren't parsed normally.
 testing/profiles/**/user.js
 
 # Ignore CORS fixtures which require specific resource hashes.
 dom/security/test/sri/script*
 
--- a/modules/libpref/greprefs.js
+++ b/modules/libpref/greprefs.js
@@ -1,10 +1,7 @@
 #include init/all.js
 #include ../../devtools/shared/preferences/devtools-shared.js
-#ifdef MOZ_DATA_REPORTING
-#include ../../toolkit/components/telemetry/datareporting-prefs.js
-#endif
 #ifdef MOZ_SERVICES_HEALTHREPORT
 #if MOZ_WIDGET_TOOLKIT != android
 #include ../../toolkit/components/telemetry/healthreport-prefs.js
 #endif
 #endif
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -5649,16 +5649,27 @@ pref("fission.rebuild_frameloaders_on_re
 pref("fission.preserve_browsing_contexts", false);
 
 // Support for legacy customizations that rely on checking the
 // user profile directory for these stylesheets:
 //  * userContent.css
 //  * userChrome.css
 pref("toolkit.legacyUserProfileCustomizations.stylesheets", false);
 
+#ifdef MOZ_DATA_REPORTING
+pref("datareporting.policy.dataSubmissionEnabled", true);
+pref("datareporting.policy.dataSubmissionPolicyNotifiedTime", "0");
+pref("datareporting.policy.dataSubmissionPolicyAcceptedVersion", 0);
+pref("datareporting.policy.dataSubmissionPolicyBypassNotification", false);
+pref("datareporting.policy.currentPolicyVersion", 2);
+pref("datareporting.policy.minimumPolicyVersion", 1);
+pref("datareporting.policy.minimumPolicyVersion.channel-beta", 2);
+pref("datareporting.policy.firstRunURL", "https://www.mozilla.org/privacy/firefox/");
+#endif
+
 pref("services.common.log.logger.rest.request", "Debug");
 pref("services.common.log.logger.rest.response", "Debug");
 pref("services.common.log.logger.tokenserverclient", "Debug");
 
 #ifdef MOZ_SERVICES_SYNC
 pref("services.sync.lastversion", "firstrun");
 pref("services.sync.sendVersionInfo", true);
 
deleted file mode 100644
--- a/toolkit/components/telemetry/datareporting-prefs.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/* global pref */
-
-pref("datareporting.policy.dataSubmissionEnabled", true);
-pref("datareporting.policy.dataSubmissionPolicyNotifiedTime", "0");
-pref("datareporting.policy.dataSubmissionPolicyAcceptedVersion", 0);
-pref("datareporting.policy.dataSubmissionPolicyBypassNotification", false);
-pref("datareporting.policy.currentPolicyVersion", 2);
-pref("datareporting.policy.minimumPolicyVersion", 1);
-pref("datareporting.policy.minimumPolicyVersion.channel-beta", 2);
-pref("datareporting.policy.firstRunURL", "https://www.mozilla.org/privacy/firefox/");