Bug 1226616 - The presence of the general.config.filename preference should be reported on telemetry. r=njn, data-review=francois a=sylvestre
☠☠ backed out by 24ed530c9a03 ☠ ☠
authorFlorian Quèze <florian@queze.net>
Thu, 23 Nov 2017 00:59:38 +0100
changeset 444899 023371c245a797cba08dd444bc0cbd83bbb17a3c
parent 444898 54fa8f9eabe7b96ee82ce4bfd157fcc8f0a5ad36
child 444900 88def880f9af3df5a6c6cc04a89836a1c9bc798d
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnjn, sylvestre
bugs1226616
milestone58.0
Bug 1226616 - The presence of the general.config.filename preference should be reported on telemetry. r=njn, data-review=francois a=sylvestre
modules/libpref/Preferences.cpp
toolkit/components/telemetry/Scalars.yaml
--- a/modules/libpref/Preferences.cpp
+++ b/modules/libpref/Preferences.cpp
@@ -3577,16 +3577,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 =
       PREF_GetCStringPref("general.config.filename", lockFileName, false);
     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"