Bug 1174333 - Telemetry for percentage of password fields on safe/unsafe pages. r=MattN,tanvi p=ally
authorKate McKinley <kmckinley@mozilla.com>
Mon, 17 Aug 2015 21:48:34 -0700
changeset 258173 0d81c8f063dddeea0fff9da0b30ed432884d3a41
parent 258172 eba41ce99321f1c9a2c508164e6991dfc4aedde8
child 258174 d9483f8ae185d9b01a8248ff8fbbf9a94eb15bd9
push id63843
push userryanvm@gmail.com
push dateTue, 18 Aug 2015 14:58:06 +0000
treeherdermozilla-inbound@d55e24c983aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMattN, tanvi
bugs1174333
milestone43.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 1174333 - Telemetry for percentage of password fields on safe/unsafe pages. r=MattN,tanvi p=ally
toolkit/components/passwordmgr/InsecurePasswordUtils.jsm
toolkit/components/telemetry/Histograms.json
--- a/toolkit/components/passwordmgr/InsecurePasswordUtils.jsm
+++ b/toolkit/components/passwordmgr/InsecurePasswordUtils.jsm
@@ -132,15 +132,19 @@ this.InsecurePasswordUtils = {
     if (!isSafePage) {
       this._sendWebConsoleMessage("InsecurePasswordsPresentOnPage", domDoc);
     }
 
     // Check if we are on an iframe with insecure src, or inside another
     // insecure iframe or document.
     if (this._checkForInsecureNestedDocuments(domDoc)) {
       this._sendWebConsoleMessage("InsecurePasswordsPresentOnIframe", domDoc);
+      isSafePage = false;
     }
 
+    // The safety of a page where we see a password field (0=unsafe; 1=safe)
+    Services.telemetry.getHistogramById("PWMGR_LOGIN_PAGE_SAFETY").add(isSafePage);
+
     if (aForm.action.match(/^http:\/\//)) {
       this._sendWebConsoleMessage("InsecureFormActionPasswordsPresent", domDoc);
     }
   },
 };
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -8334,16 +8334,29 @@
     "description": "The effect of the form action on signon autofill. (0=No effect, 1=Fewer logins after considering the form action, 2=No logins match form origin and action."
   },
   "PWMGR_FORM_AUTOFILL_RESULT": {
     "expires_in_version": "never",
     "kind": "enumerated",
     "n_values" : 20,
     "description": "The result of auto-filling a login form. See http://mzl.la/1Mbs6jL for bucket descriptions."
   },
+  "PWMGR_LOGIN_LAST_USED_DAYS": {
+    "expires_in_version": "never",
+    "kind": "exponential",
+    "high": 750,
+    "n_buckets" : 40,
+    "description": "Time in days each saved login was last used"
+  },
+  "PWMGR_LOGIN_PAGE_SAFETY": {
+    "expires_in_version": "55",
+    "kind": "enumerated",
+    "n_values": 8,
+    "description": "The safety of a page where we see a password field. (0=unsafe, 1=safe)"
+  },
   "PWMGR_MANAGE_COPIED_PASSWORD": {
     "expires_in_version": "never",
     "kind": "count",
     "description": "Count of passwords copied from the password management interface"
   },
   "PWMGR_MANAGE_COPIED_USERNAME": {
     "expires_in_version": "never",
     "kind": "count",
@@ -8393,23 +8406,16 @@
   },
   "PWMGR_NUM_HTTPAUTH_PASSWORDS": {
     "expires_in_version": "never",
     "kind": "exponential",
     "high": 750,
     "n_buckets" : 50,
     "description": "Number of HTTP Auth logins"
   },
-  "PWMGR_LOGIN_LAST_USED_DAYS": {
-    "expires_in_version": "never",
-    "kind": "exponential",
-    "high": 750,
-    "n_buckets" : 40,
-    "description": "Time in days each saved login was last used"
-  },
   "PWMGR_PASSWORD_INPUT_IN_FORM": {
     "expires_in_version": "never",
     "kind": "boolean",
     "description": "Whether an <input type=password> is associated with a <form> when it is added to a document"
   },
   "PWMGR_PROMPT_REMEMBER_ACTION" : {
     "expires_in_version": "never",
     "kind": "enumerated",