Bug 1630863 - Port bug 1628029: Add telemetry events for OS authentication. r=mkmelin a=wsmwk
authorRichard Marti <richard.marti@gmail.com>
Fri, 17 Apr 2020 11:58:35 +0200
changeset 38708 fbea3ecb0b2ac840abd4490008543f944e13978b
parent 38707 7bfa35b519a6ec81b0f128c116d913303b1a951b
child 38709 f049099923e4de955115d4150214936f37912021
push id400
push userclokep@gmail.com
push dateMon, 04 May 2020 18:56:09 +0000
reviewersmkmelin, wsmwk
bugs1630863, 1628029
Bug 1630863 - Port bug 1628029: Add telemetry events for OS authentication. r=mkmelin a=wsmwk
mail/components/preferences/passwordManager.js
mail/components/preferences/privacy.js
--- a/mail/components/preferences/passwordManager.js
+++ b/mail/components/preferences/passwordManager.js
@@ -828,17 +828,17 @@ async function masterPasswordLogin(noPas
         },
       ]);
       let loggedIn = await OSKeyStore.ensureLoggedIn(
         messageText.value,
         captionText.value,
         window,
         false
       );
-      if (!loggedIn) {
+      if (!loggedIn.authenticated) {
         return false;
       }
       return true;
     }
     return noPasswordCallback ? noPasswordCallback() : true;
   }
 
   // So there's a master password. But since checkPassword didn't succeed, we're logged out (per nsIPK11Token.idl).
--- a/mail/components/preferences/privacy.js
+++ b/mail/components/preferences/privacy.js
@@ -347,17 +347,17 @@ var gPrivacyPane = {
         },
       ]);
       let loggedIn = await OSKeyStore.ensureLoggedIn(
         messageText.value,
         captionText.value,
         window,
         false
       );
-      if (!loggedIn) {
+      if (!loggedIn.authenticated) {
         return;
       }
     }
 
     gSubDialog.open(
       "chrome://mozapps/content/preferences/changemp.xhtml",
       null,
       null,