Bug 855928 - Add a telemetry probe to report default desktop browser status. r=gavin

This commit is contained in:
Jim Mathies 2013-05-30 12:32:17 -05:00
Родитель 1c504b203b
Коммит e988bc20b0
2 изменённых файлов: 15 добавлений и 3 удалений

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

@ -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."
}
}