Bug 1118871 - Add telemetry to count the number of sites in the password manager blocklist. r=MattN, a=lmandel
authorChenxia Liu <liuche@mozilla.com>
Fri, 23 Jan 2015 18:46:35 -0800
changeset 249668 ccb525f5d1d3d86e728b07b58229b8da685accb2
parent 249667 29b870324ecb0a2ba5474eb0bb7f456c66c6a2a6
child 249669 396eb0f2d14463affb28ff2adb5001d2a7e0f53f
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMattN, lmandel
bugs1118871
milestone37.0a2
Bug 1118871 - Add telemetry to count the number of sites in the password manager blocklist. r=MattN, a=lmandel
toolkit/components/passwordmgr/nsLoginManager.js
toolkit/components/telemetry/Histograms.json
--- a/toolkit/components/passwordmgr/nsLoginManager.js
+++ b/toolkit/components/passwordmgr/nsLoginManager.js
@@ -204,16 +204,20 @@ LoginManager.prototype = {
                 this._pwmgr._gatherTelemetry();
             } else {
                 log("Oops! Unexpected notification:", topic);
             }
         }
     },
 
     _gatherTelemetry : function() {
+      let numPasswordsBlocklist = Services.telemetry.getHistogramById("PWMGR_BLOCKLIST_NUM_SITES");
+      numPasswordsBlocklist.clear();
+      numPasswordsBlocklist.add(this.getAllDisabledHosts({}).length);
+
       let numPasswordsHist = Services.telemetry.getHistogramById("PWMGR_NUM_SAVED_PASSWORDS");
       numPasswordsHist.clear();
       numPasswordsHist.add(this.countLogins("", "", ""));
 
       let isPwdSavedEnabledHist = Services.telemetry.getHistogramById("PWMGR_SAVING_ENABLED");
       isPwdSavedEnabledHist.clear();
       isPwdSavedEnabledHist.add(this._remember);
 
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -7153,16 +7153,24 @@
   },
   "DATA_STORAGE_ENTRIES": {
     "expires_in_version": "default",
     "kind": "linear",
     "high": "1024",
     "n_buckets": 16,
     "description": "The number of entries in persistent DataStorage (HSTS and HPKP data, basically)"
   },
+  "PWMGR_BLOCKLIST_NUM_SITES": {
+    "expires_in_version": "never",
+    "kind": "exponential",
+    "high": 100,
+    "n_buckets" : 10,
+    "extended_statistics_ok": true,
+    "description": "The number of sites for which the user has explicitly rejected saving logins"
+  },
   "PWMGR_NUM_SAVED_PASSWORDS": {
     "expires_in_version": "never",
     "kind": "exponential",
     "high": 750,
     "n_buckets" : 50,
     "extended_statistics_ok": true,
     "description": "The number of saved signons in storage"
   },