mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1203624 - Measure view source usage. r=mconley p=ally
This commit is contained in:
parent
2fedad2648
commit
568fb76791
@ -7352,6 +7352,24 @@
|
||||
"n_buckets": 20,
|
||||
"description": "The amount of time spent in a specific performance tool view, keyed by view name (waterfall, js-calltree, js-flamegraph, etc)."
|
||||
},
|
||||
"VIEW_SOURCE_IN_BROWSER_OPENED_BOOLEAN": {
|
||||
"alert_emails": ["mozilla-dev-developer-tools@lists.mozilla.org", "jryans@mozilla.com"],
|
||||
"expires_in_version": "53",
|
||||
"kind": "boolean",
|
||||
"description": "How many times has view source in browser / tab been opened?"
|
||||
},
|
||||
"VIEW_SOURCE_IN_WINDOW_OPENED_BOOLEAN": {
|
||||
"alert_emails": ["mozilla-dev-developer-tools@lists.mozilla.org", "jryans@mozilla.com"],
|
||||
"expires_in_version": "53",
|
||||
"kind": "boolean",
|
||||
"description": "How many times has view source in a new window been opened?"
|
||||
},
|
||||
"VIEW_SOURCE_EXTERNAL_RESULT_BOOLEAN": {
|
||||
"alert_emails": ["mozilla-dev-developer-tools@lists.mozilla.org", "jryans@mozilla.com"],
|
||||
"expires_in_version": "53",
|
||||
"kind": "boolean",
|
||||
"description": "How many times has view source in an external editor been opened, and did it succeed?"
|
||||
},
|
||||
"BROWSER_IS_USER_DEFAULT": {
|
||||
"expires_in_version": "never",
|
||||
"kind": "boolean",
|
||||
|
@ -88,6 +88,9 @@ var gViewSourceUtils = {
|
||||
* The line number to focus on once the source is loaded.
|
||||
*/
|
||||
viewSourceInBrowser: function(aArgs) {
|
||||
Services.telemetry
|
||||
.getHistogramById("VIEW_SOURCE_IN_BROWSER_OPENED_BOOLEAN")
|
||||
.add(true);
|
||||
let viewSourceBrowser = new ViewSourceBrowser(aArgs.viewSourceBrowser);
|
||||
viewSourceBrowser.loadViewSource(aArgs);
|
||||
},
|
||||
@ -156,6 +159,9 @@ var gViewSourceUtils = {
|
||||
} catch (ex) {
|
||||
}
|
||||
}
|
||||
Services.telemetry
|
||||
.getHistogramById("VIEW_SOURCE_IN_WINDOW_OPENED_BOOLEAN")
|
||||
.add(true);
|
||||
openDialog("chrome://global/content/viewSource.xul",
|
||||
"_blank",
|
||||
"all,dialog=no",
|
||||
@ -340,7 +346,10 @@ var gViewSourceUtils = {
|
||||
// Calls the callback, keeping in mind undefined or null values.
|
||||
handleCallBack: function(aCallBack, result, data)
|
||||
{
|
||||
// ifcallback is undefined, default to the internal viewer
|
||||
Services.telemetry
|
||||
.getHistogramById("VIEW_SOURCE_EXTERNAL_RESULT_BOOLEAN")
|
||||
.add(result);
|
||||
// if callback is undefined, default to the internal viewer
|
||||
if (aCallBack === undefined) {
|
||||
this.internalViewerFallback(result, data);
|
||||
} else if (aCallBack) {
|
||||
|
Loading…
Reference in New Issue
Block a user