зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1065880 - Measure e10s usage through telemetry. r=bsmedberg,mconley
This commit is contained in:
Родитель
4280c39cc9
Коммит
139fe9d530
|
@ -1097,6 +1097,8 @@ var gBrowserInit = {
|
|||
TabCrashReporter.init();
|
||||
#endif
|
||||
|
||||
Services.telemetry.getHistogramById("E10S_WINDOW").add(gMultiProcessBrowser);
|
||||
|
||||
if (mustLoadSidebar) {
|
||||
let sidebar = document.getElementById("sidebar");
|
||||
let sidebarBox = document.getElementById("sidebar-box");
|
||||
|
|
|
@ -6594,5 +6594,25 @@
|
|||
"kind": "enumerated",
|
||||
"n_values": 3,
|
||||
"description": "Doorhanger shown = 0, Disable = 1, Enable = 2"
|
||||
},
|
||||
"E10S_AUTOSTART": {
|
||||
"expires_in_version": "never",
|
||||
"kind": "boolean",
|
||||
"description": "Whether a session is set to autostart e10s windows"
|
||||
},
|
||||
"E10S_WINDOW": {
|
||||
"expires_in_version": "never",
|
||||
"kind": "boolean",
|
||||
"description": "Whether a browser window is set as an e10s window"
|
||||
},
|
||||
"E10S_STILL_ACCEPTED_FROM_PROMPT": {
|
||||
"expires_in_version": "40",
|
||||
"kind": "boolean",
|
||||
"description": "Whether a user who accepted e10s from the prompt is still using e10s"
|
||||
},
|
||||
"E10S_BLOCKED_FROM_RUNNING": {
|
||||
"expires_in_version": "40",
|
||||
"kind": "boolean",
|
||||
"description": "Whether the e10s pref was set but it was blocked from running due to blacklisted conditions"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4524,9 +4524,19 @@ bool
|
|||
mozilla::BrowserTabsRemoteAutostart()
|
||||
{
|
||||
if (!gBrowserTabsRemoteAutostartInitialized) {
|
||||
gBrowserTabsRemoteAutostart = !gSafeMode &&
|
||||
Preferences::GetBool("browser.tabs.remote.autostart", false);
|
||||
bool prefEnabled = Preferences::GetBool("browser.tabs.remote.autostart", false);
|
||||
gBrowserTabsRemoteAutostart = !gSafeMode && prefEnabled;
|
||||
gBrowserTabsRemoteAutostartInitialized = true;
|
||||
|
||||
mozilla::Telemetry::Accumulate(mozilla::Telemetry::E10S_AUTOSTART, gBrowserTabsRemoteAutostart);
|
||||
if (Preferences::GetBool("browser.enabledE10SFromPrompt", false)) {
|
||||
mozilla::Telemetry::Accumulate(mozilla::Telemetry:E10S_STILL_ACCEPTED_FROM_PROMPT,
|
||||
gBrowserTabsRemoteAutostart);
|
||||
}
|
||||
if (prefEnabled) {
|
||||
mozilla::Telemetry::Accumulate(mozilla::Telemetry::E10S_BLOCKED_FROM_RUNNING,
|
||||
!gBrowserTabsRemoteAutostart);
|
||||
}
|
||||
}
|
||||
|
||||
return gBrowserTabsRemoteAutostart;
|
||||
|
|
Загрузка…
Ссылка в новой задаче