Bug 1313580 - Part 2: Remove telemetry probe for Battery API. r=baku
authorChris Peterson <cpeterson@mozilla.com>
Fri, 28 Oct 2016 18:41:55 -0700
changeset 320110 585f52662d697ca95cb679246cc59ce28fefe60b
parent 320109 8f8f02af9d17a6c04462cedaab803b89acd681d7
child 320111 6069dc9afe31c75b809df062af362df76faf25cc
push id20749
push userryanvm@gmail.com
push dateSat, 29 Oct 2016 13:21:21 +0000
treeherderfx-team@1b170b39ed6b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1313580
milestone52.0a1
Bug 1313580 - Part 2: Remove telemetry probe for Battery API. r=baku
dom/base/Navigator.cpp
toolkit/components/telemetry/Histograms.json
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -1526,20 +1526,16 @@ Navigator::GetBattery(ErrorResult& aRv)
 
   nsCOMPtr<nsIGlobalObject> go = do_QueryInterface(mWindow);
   RefPtr<Promise> batteryPromise = Promise::Create(go, aRv);
   if (NS_WARN_IF(aRv.Failed())) {
     return nullptr;
   }
   mBatteryPromise = batteryPromise;
 
-  // We just initialized mBatteryPromise, so we know this is the first time
-  // this page has accessed navigator.getBattery(). 1 = navigator.getBattery()
-  Telemetry::Accumulate(Telemetry::BATTERY_STATUS_COUNT, 1);
-
   if (!mBatteryManager) {
     mBatteryManager = new battery::BatteryManager(mWindow);
     mBatteryManager->Init();
   }
 
   mBatteryPromise->MaybeResolve(mBatteryManager);
 
   return mBatteryPromise;
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -125,24 +125,16 @@
     "releaseChannelCollection": "opt-out"
   },
   "BACKGROUNDFILESAVER_THREAD_COUNT": {
     "expires_in_version": "never",
     "kind": "enumerated",
     "n_values": 21,
     "description": "Maximum number of concurrent threads reached during a given download session"
   },
-  "BATTERY_STATUS_COUNT": {
-    "alert_emails": ["cpeterson@mozilla.com"],
-    "bug_numbers": [1259335],
-    "expires_in_version": "52",
-    "kind": "enumerated",
-    "n_values": 10,
-    "description": "Number of pages that use the Battery Status API: 0=navigator.battery, 1=navigator.getBattery()"
-  },
   "BLOCKLIST_SYNC_FILE_LOAD": {
     "alert_emails": ["rvitillo@mozilla.com"],
     "expires_in_version": "35",
     "kind": "boolean",
     "description": "blocklist.xml has been loaded synchronously *** No longer needed (bug 1156565). Delete histogram and accumulation code! ***"
   },
   "CHECKERBOARD_DURATION": {
     "alert_emails": ["kgupta@mozilla.com"],