зеркало из https://github.com/mozilla/gecko-dev.git
Bug 855928 - Add a telemetry probe to report default desktop browser status. r=gavin
This commit is contained in:
Родитель
1c504b203b
Коммит
e988bc20b0
|
@ -580,9 +580,17 @@ BrowserGlue.prototype = {
|
|||
(ss.sessionType == Ci.nsISessionStartup.RECOVER_SESSION);
|
||||
}
|
||||
catch (ex) { /* never mind; suppose SessionStore is broken */ }
|
||||
if (shouldCheck &&
|
||||
!shell.isDefaultBrowser(true, false) &&
|
||||
!willRecoverSession) {
|
||||
|
||||
let isDefault = shell.isDefaultBrowser(true, false); // startup check, check all assoc
|
||||
try {
|
||||
// Report default browser status on startup to telemetry
|
||||
// so we can track whether we are the default.
|
||||
Services.telemetry.getHistogramById("BROWSER_IS_USER_DEFAULT")
|
||||
.add(isDefault);
|
||||
}
|
||||
catch (ex) { /* Don't break the default prompt if telemetry is broken. */ }
|
||||
|
||||
if (shouldCheck && !isDefault && !willRecoverSession) {
|
||||
Services.tm.mainThread.dispatch(function() {
|
||||
var win = this.getMostRecentBrowserWindow();
|
||||
var brandBundle = win.document.getElementById("bundle_brand");
|
||||
|
|
|
@ -3569,5 +3569,9 @@
|
|||
"high": "10000000",
|
||||
"n_buckets": 100,
|
||||
"description": "How long has the developer toolbar been active (seconds)"
|
||||
},
|
||||
"BROWSER_IS_USER_DEFAULT": {
|
||||
"kind": "boolean",
|
||||
"description": "The result of the startup default desktop browser check."
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче