mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 12:50:09 +00:00
Bug 704538 - Create telemetry probe to ascertain what proportion of users may prefer bug 695482's new 'open search in foreground' behaviour. r=gavin,tglek
This commit is contained in:
parent
12655bf59b
commit
942f7e06cb
@ -3478,10 +3478,29 @@ const BrowserSearch = {
|
||||
if (!submission)
|
||||
return;
|
||||
|
||||
let newTab;
|
||||
function newTabHandler(event) {
|
||||
newTab = event.target;
|
||||
}
|
||||
gBrowser.tabContainer.addEventListener("TabOpen", newTabHandler);
|
||||
|
||||
openLinkIn(submission.uri.spec,
|
||||
useNewTab ? "tab" : "current",
|
||||
{ postData: submission.postData,
|
||||
relatedToCurrent: true });
|
||||
|
||||
gBrowser.tabContainer.removeEventListener("TabOpen", newTabHandler);
|
||||
if (newTab && !newTab.selected) {
|
||||
let tabSelected = false;
|
||||
function tabSelectHandler() {
|
||||
tabSelected = true;
|
||||
}
|
||||
newTab.addEventListener("TabSelect", tabSelectHandler);
|
||||
setTimeout(function () {
|
||||
newTab.removeEventListener("TabSelect", tabSelectHandler);
|
||||
Services.telemetry.getHistogramById("FX_CONTEXT_SEARCH_AND_TAB_SELECT").add(tabSelected);
|
||||
}, 5000);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -275,6 +275,13 @@ HISTOGRAM(THUNDERBIRD_CONVERSATIONS_TIME_TO_2ND_GLODA_QUERY_MS, 1, 10000, 30, EX
|
||||
HISTOGRAM(THUNDERBIRD_INDEXING_RATE_MSG_PER_S, 1, 100, 20, LINEAR, "Gloda: indexing rate (message/s)")
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Firefox-specific telemetry.
|
||||
*/
|
||||
#ifdef MOZ_PHOENIX
|
||||
HISTOGRAM(FX_CONTEXT_SEARCH_AND_TAB_SELECT, 0, 1, 2, BOOLEAN, "Firefox: Background tab was selected within 5 seconds of searching from the context menu")
|
||||
#endif
|
||||
|
||||
HISTOGRAM_BOOLEAN(INNERWINDOWS_WITH_MUTATION_LISTENERS, "Deleted or to-be-reused innerwindow which has had mutation event listeners.")
|
||||
HISTOGRAM(XUL_REFLOW_MS, 1, 3000, 10, EXPONENTIAL, "xul reflows")
|
||||
HISTOGRAM(XUL_INITIAL_FRAME_CONSTRUCTION, 1, 3000, 10, EXPONENTIAL, "initial xul frame construction")
|
||||
|
Loading…
x
Reference in New Issue
Block a user