зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1388145 - Make Master Password telemetry only run once per session (and not per window), and run it after an idle period. r=MattN
MozReview-Commit-ID: 1Ecy94TGGar --HG-- extra : rebase_source : 40596aaaf9f01fe6a565d5ebf1357951c928a863
This commit is contained in:
Родитель
fadfebac0a
Коммит
635177b023
|
@ -1747,21 +1747,6 @@ var gBrowserInit = {
|
|||
SidebarUI.startDelayedLoad();
|
||||
SocialUI.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 tokenDB = Cc["@mozilla.org/security/pk11tokendb;1"]
|
||||
.getService(Ci.nsIPK11TokenDB);
|
||||
let token = tokenDB.getInternalKeyToken();
|
||||
let mpEnabled = token.hasPassword;
|
||||
if (mpEnabled) {
|
||||
Services.telemetry.getHistogramById("MASTER_PASSWORD_ENABLED").add(mpEnabled);
|
||||
}
|
||||
}, 5000);
|
||||
|
||||
PanicButtonNotifier.init();
|
||||
});
|
||||
|
||||
|
|
|
@ -1161,6 +1161,18 @@ BrowserGlue.prototype = {
|
|||
Services.tm.idleDispatchToMainThread(() => {
|
||||
this._sendMediaTelemetry();
|
||||
});
|
||||
|
||||
Services.tm.idleDispatchToMainThread(() => {
|
||||
// Telemetry for master-password - we do this after a delay as it
|
||||
// can cause IO if NSS/PSM has not already initialized.
|
||||
let tokenDB = Cc["@mozilla.org/security/pk11tokendb;1"]
|
||||
.getService(Ci.nsIPK11TokenDB);
|
||||
let token = tokenDB.getInternalKeyToken();
|
||||
let mpEnabled = token.hasPassword;
|
||||
if (mpEnabled) {
|
||||
Services.telemetry.getHistogramById("MASTER_PASSWORD_ENABLED").add(mpEnabled);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
_createExtraDefaultProfile() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче