Bug 1016138 - Add telemetry probe for master password usage. r=dolske

This commit is contained in:
Mark Hammond 2014-06-14 11:45:52 +10:00
Родитель 60a06fbeeb
Коммит 149910a91a
2 изменённых файлов: 20 добавлений и 0 удалений

Просмотреть файл

@ -1226,6 +1226,21 @@ var gBrowserInit = {
SocialUI.init();
TabView.init();
// Telemetry for master-password - we do this after 5 seconds as it
// can cause IO if NSS/PSM has not already initialized.
setTimeout(() => {
if (window.closed) {
return;
}
let secmodDB = Cc["@mozilla.org/security/pkcs11moduledb;1"]
.getService(Ci.nsIPKCS11ModuleDB);
let slot = secmodDB.findSlotByName("");
let mpEnabled = slot &&
slot.status != Ci.nsIPKCS11Slot.SLOT_UNINITIALIZED &&
slot.status != Ci.nsIPKCS11Slot.SLOT_READY;
Services.telemetry.getHistogramById("MASTER_PASSWORD_ENABLED").add(mpEnabled);
}, 5000);
});
this.delayedStartupFinished = true;

Просмотреть файл

@ -6418,5 +6418,10 @@
"kind": "enumerated",
"n_values": 30,
"description": "Algorithms used with WebCrypto (see table in WebCryptoTask.cpp)"
},
"MASTER_PASSWORD_ENABLED": {
"expires_in_version": "never",
"kind": "flag",
"description": "If a master-password is enabled for this profile"
}
}