Bug 737600 - When telemetry is disabled in the pref pane, we should update toolkit.telemetry.rejected. r=bnicholson
authorTheo Chevalier <theo.chevalier11@gmail.com>
Mon, 10 Dec 2012 23:25:54 +0100
changeset 115557 4c4bdc7fc6c6dd96ce72a768a4acd8dd0df2daf3
parent 115556 ad491d4e39da0197c08a2ffc10f9206ea7bea82d
child 115558 7271e935c3977cebffcab8da941fed4e90a5fcf0
push id19412
push usertheo.chevalier11@gmail.com
push dateMon, 10 Dec 2012 22:26:27 +0000
treeherdermozilla-inbound@4c4bdc7fc6c6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbnicholson
bugs737600
milestone20.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 737600 - When telemetry is disabled in the pref pane, we should update toolkit.telemetry.rejected. r=bnicholson
mobile/android/chrome/content/browser.js
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -7137,18 +7137,20 @@ var Telemetry = {
     let histogram = telemetry.getHistogramById(aHistogramId);
     histogram.add(aValue);
   },
 
   observe: function observe(aSubject, aTopic, aData) {
     if (aTopic == "Preferences:Set") {
       // if user changes telemetry pref, treat it like they have been prompted
       let pref = JSON.parse(aData);
-      if (pref.name == this._PREF_TELEMETRY_ENABLED)
+      if (pref.name == this._PREF_TELEMETRY_ENABLED) {
         Services.prefs.setIntPref(this._PREF_TELEMETRY_DISPLAYED, this._TELEMETRY_DISPLAY_REV);
+        Services.prefs.setBoolPref(this._PREF_TELEMETRY_REJECTED, !pref.value);
+      }
     } else if (aTopic == "Telemetry:Add") {
       let json = JSON.parse(aData);
       this.addData(json.name, json.value);
     } else if (aTopic == "Telemetry:Prompt") {
 #ifdef MOZ_TELEMETRY_REPORTING
       this.prompt();
 #endif
     }