Bug 1598451 - Update TelemetryEnvironment pref constant descriptions r=chutten
authorTim D. Smith <tdsmith@mozilla.com>
Thu, 21 Nov 2019 21:34:00 +0000
changeset 503331 914860bfb51ae6adea42d1c52f5570aaf2af66e6
parent 503330 9f52e0351809b81a93181b2a0651ae18fb58a48a
child 503332 da5d5f59a7da9645dc99a684a4f4564c46dda24f
push id36833
push userbtara@mozilla.com
push dateFri, 22 Nov 2019 21:40:53 +0000
treeherdermozilla-central@2c912e46295e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschutten
bugs1598451
milestone72.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 1598451 - Update TelemetryEnvironment pref constant descriptions r=chutten Make clearer that * RECORD_PREF_VALUE and RECORD_PREF_STATE only consult the user branch * RECORD_DEFAULTPREF_VALUE and RECORD_DEFAULTPREF_STATE consult both Differential Revision: https://phabricator.services.mozilla.com/D54186
toolkit/components/telemetry/app/TelemetryEnvironment.jsm
--- a/toolkit/components/telemetry/app/TelemetryEnvironment.jsm
+++ b/toolkit/components/telemetry/app/TelemetryEnvironment.jsm
@@ -177,20 +177,29 @@ var TelemetryEnvironment = {
     return result;
   },
 
   shutdown() {
     return getGlobal().shutdown();
   },
 
   // Policy to use when saving preferences. Exported for using them in tests.
-  RECORD_PREF_STATE: 1, // Don't record the preference value
-  RECORD_PREF_VALUE: 2, // We only record user-set prefs.
-  RECORD_DEFAULTPREF_VALUE: 3, // We only record default pref if set
-  RECORD_DEFAULTPREF_STATE: 4, // We only record if the pref exists
+  // Reports "<user-set>" if there is a value set on the user branch
+  RECORD_PREF_STATE: 1,
+
+  // Reports the value set on the user branch, if one is set
+  RECORD_PREF_VALUE: 2,
+
+  // Reports the active value (set on either the user or default branch)
+  // for this pref, if one is set
+  RECORD_DEFAULTPREF_VALUE: 3,
+
+  // Reports "<set>" if a value for this pref is defined on either the user
+  // or default branch
+  RECORD_DEFAULTPREF_STATE: 4,
 
   // Testing method
   async testWatchPreferences(prefMap) {
     return getGlobal()._watchPreferences(prefMap);
   },
 
   /**
    * Intended for use in tests only.