From dbd0f6766482cacea49d4506a5c3a5b1992a8307 Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Thu, 15 Aug 2013 15:27:07 -0400 Subject: [PATCH] Bug 905759 - part 3 - delete browser.js code for receiving telemetry events from Java; r=mfinkle --- mobile/android/chrome/content/browser.js | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/mobile/android/chrome/content/browser.js b/mobile/android/chrome/content/browser.js index 1dba085b70b..68de889d987 100644 --- a/mobile/android/chrome/content/browser.js +++ b/mobile/android/chrome/content/browser.js @@ -336,9 +336,6 @@ var BrowserApp = { ExternalApps.init(); Distribution.init(); Tabs.init(); -#ifdef MOZ_TELEMETRY_REPORTING - Telemetry.init(); -#endif #ifdef ACCESSIBILITY AccessFu.attach(window); #endif @@ -657,9 +654,6 @@ var BrowserApp = { ExternalApps.uninit(); Distribution.uninit(); Tabs.uninit(); -#ifdef MOZ_TELEMETRY_REPORTING - Telemetry.uninit(); -#endif }, // This function returns false during periods where the browser displayed document is @@ -7088,26 +7082,10 @@ var RemoteDebugger = { var Telemetry = { SHARED_PREF_TELEMETRY_ENABLED: "datareporting.telemetry.enabled", - init: function init() { - Services.obs.addObserver(this, "Telemetry:Add", false); - }, - - uninit: function uninit() { - Services.obs.removeObserver(this, "Telemetry:Add"); - }, - addData: function addData(aHistogramId, aValue) { - let telemetry = Cc["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry); - let histogram = telemetry.getHistogramById(aHistogramId); + let histogram = Services.telemetry.getHistogramById(aHistogramId); histogram.add(aValue); }, - - observe: function observe(aSubject, aTopic, aData) { - if (aTopic == "Telemetry:Add") { - let json = JSON.parse(aData); - this.addData(json.name, json.value); - } - }, }; let Reader = {