Bug 1226616 - The presence of the general.config.filename preference should be reported on telemetry. r=njn, data-review=francois
authorFlorian Quèze <florian@queze.net>
Thu, 23 Nov 2017 00:59:38 +0100
changeset 393257 1603e2488c32ef4f37527bee7fd15ae85401108a
parent 393256 70140253fc37031a23a7ac1e8538116d9fd697c7
child 393258 707917eb9b1bbf36c3b05b3ce2be35cecde7051b
push id97620
push userflorian@queze.net
push dateThu, 23 Nov 2017 00:01:41 +0000
treeherdermozilla-inbound@1603e2488c32 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnjn
bugs1226616
milestone59.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 1226616 - The presence of the general.config.filename preference should be reported on telemetry. r=njn, data-review=francois
modules/libpref/Preferences.cpp
toolkit/components/telemetry/Scalars.yaml
--- a/modules/libpref/Preferences.cpp
+++ b/modules/libpref/Preferences.cpp
@@ -3250,16 +3250,18 @@ Preferences::GetInstanceForService()
 
   } else {
     // Check if there is a deployment configuration file. If so, set up the
     // pref config machinery, which will actually read the file.
     nsAutoCString lockFileName;
     nsresult rv = Preferences::GetCString(
       "general.config.filename", lockFileName, PrefValueKind::User);
     if (NS_SUCCEEDED(rv)) {
+      Telemetry::ScalarSet(Telemetry::ScalarID::GENERAL_AUTOCONFIG_HAS_FILENAME,
+                           true);
       NS_CreateServicesFromCategory(
         "pref-config-startup",
         static_cast<nsISupports*>(static_cast<void*>(sPreferences)),
         "pref-config-startup");
     }
 
     nsCOMPtr<nsIObserverService> observerService =
       mozilla::services::GetObserverService();
--- a/toolkit/components/telemetry/Scalars.yaml
+++ b/toolkit/components/telemetry/Scalars.yaml
@@ -437,16 +437,31 @@ storage.sync.api.usage:
     kind: uint
     keyed: true
     notification_emails:
       - eglassercamp@mozilla.com
     release_channel_collection: opt-out
     record_in_processes:
       - main
 
+general.autoconfig:
+  has_filename:
+    bug_numbers:
+      - 1226616
+    description: >
+      Recorded on startup. Boolean stating whether the
+      general.autoconfig.filename preference has a value.
+    expires: never
+    kind: boolean
+    notification_emails:
+      - florian@mozilla.com
+    release_channel_collection: opt-out
+    record_in_processes:
+      - 'main'
+
 services.sync:
   fxa_verification_method:
     bug_numbers:
       - 1353645
     description: >
       The method we used ("push" or "poll") to determine the verification of a
       Firefox Account email.
     expires: "60"