зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1448061 - Improve accuracy of devtools entry points telemetry r=jdescottes
MozReview-Commit-ID: GmXQktPew5B --HG-- extra : rebase_source : 5209ee98a1192154dea95f139481941e01d2ae67
This commit is contained in:
Родитель
a6190a3d86
Коммит
c1bd6c3abe
|
@ -153,7 +153,7 @@ this.DevToolsShim = {
|
|||
return;
|
||||
}
|
||||
|
||||
this.initDevTools();
|
||||
this.initDevTools("SessionRestore");
|
||||
this._gDevTools.restoreDevToolsSession(session);
|
||||
},
|
||||
|
||||
|
|
|
@ -273,7 +273,7 @@ DevToolsStartup.prototype = {
|
|||
if (Services.prefs.getBoolPref(TOOLBAR_VISIBLE_PREF, false)) {
|
||||
// Loading devtools-browser will open the developer toolbar by also checking this
|
||||
// pref.
|
||||
this.initDevTools();
|
||||
this.initDevTools("DeveloperToolbar");
|
||||
}
|
||||
|
||||
// This listener is called for all Firefox windows, but we want to execute some code
|
||||
|
@ -612,18 +612,7 @@ DevToolsStartup.prototype = {
|
|||
return null;
|
||||
}
|
||||
|
||||
if (reason && !this.recorded) {
|
||||
// Only save the first call for each firefox run as next call
|
||||
// won't necessarely start the tool. For example key shortcuts may
|
||||
// only change the currently selected tool.
|
||||
try {
|
||||
Services.telemetry.getHistogramById("DEVTOOLS_ENTRY_POINT")
|
||||
.add(reason);
|
||||
} catch (e) {
|
||||
dump("DevTools telemetry entry point failed: " + e + "\n");
|
||||
}
|
||||
this.recorded = true;
|
||||
}
|
||||
this.sendEntryPointTelemetry(reason);
|
||||
|
||||
this.initialized = true;
|
||||
let { require } = ChromeUtils.import("resource://devtools/shared/Loader.jsm", {});
|
||||
|
@ -750,6 +739,8 @@ DevToolsStartup.prototype = {
|
|||
Services.obs.addObserver(observe, "devtools-thread-resumed");
|
||||
}
|
||||
|
||||
this.sendEntryPointTelemetry("CommandLine");
|
||||
|
||||
const { BrowserToolboxProcess } = ChromeUtils.import("resource://devtools/client/framework/ToolboxProcess.jsm", {});
|
||||
BrowserToolboxProcess.init();
|
||||
|
||||
|
@ -834,6 +825,21 @@ DevToolsStartup.prototype = {
|
|||
}
|
||||
},
|
||||
|
||||
sendEntryPointTelemetry(reason) {
|
||||
if (reason && !this.recorded) {
|
||||
// Only save the first call for each firefox run as next call
|
||||
// won't necessarely start the tool. For example key shortcuts may
|
||||
// only change the currently selected tool.
|
||||
try {
|
||||
Services.telemetry.getHistogramById("DEVTOOLS_ENTRY_POINT")
|
||||
.add(reason);
|
||||
} catch (e) {
|
||||
dump("DevTools telemetry entry point failed: " + e + "\n");
|
||||
}
|
||||
this.recorded = true;
|
||||
}
|
||||
},
|
||||
|
||||
// Used by tests and the toolbox to register the same key shortcuts in toolboxes loaded
|
||||
// in a window window.
|
||||
get KeyShortcuts() {
|
||||
|
|
|
@ -9294,7 +9294,7 @@
|
|||
"alert_emails": ["dev-developer-tools@lists.mozilla.org", "apoirot@mozilla.com"],
|
||||
"expires_in_version": "never",
|
||||
"kind": "categorical",
|
||||
"labels": ["KeyShortcut", "SystemMenu", "HamburgerMenu", "ContextMenu", "CommandLine"],
|
||||
"labels": ["KeyShortcut", "SystemMenu", "HamburgerMenu", "ContextMenu", "CommandLine", "DeveloperToolbar", "SessionRestore"],
|
||||
"releaseChannelCollection": "opt-out",
|
||||
"description": "Records how the user is triggering Developer Tools startup."
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче