Bug 1275570 - "Add Telemetry probe to see how often users enter print preview, and how many simplify the view". r=mconley

This commit is contained in:
Thauã Silveira 2016-06-08 13:14:00 +02:00
Родитель e730d38cc4
Коммит dd4f3dccc6
2 изменённых файлов: 28 добавлений и 0 удалений

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

@ -197,6 +197,9 @@ var PrintUtils = {
this._sourceBrowser = aListenerObj.getSourceBrowser();
this._originalTitle = this._sourceBrowser.contentTitle;
this._originalURL = this._sourceBrowser.currentURI.spec;
// Here we log telemetry data for when the user enters print preview.
this.logTelemetry("PRINT_PREVIEW_OPENED_COUNT");
} else {
// collapse the browser here -- it will be shown in
// enterPrintPreview; this forces a reflow which fixes display
@ -530,6 +533,9 @@ var PrintUtils = {
URL: this._listener.getSourceBrowser().currentURI.spec,
windowID: this._listener.getSourceBrowser().outerWindowID,
});
// Here we log telemetry data for when the user enters simplify mode.
this.logTelemetry("PRINT_PREVIEW_SIMPLIFY_PAGE_OPENED_COUNT");
}
} else {
sendEnterPreviewMessage(this._listener.getSourceBrowser(), false);
@ -635,6 +641,12 @@ var PrintUtils = {
this._listener.onExit();
},
logTelemetry: function (ID)
{
let histogram = Services.telemetry.getHistogramById(ID);
histogram.add(true);
},
onKeyDownPP: function (aEvent)
{
// Esc exits the PP

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

@ -5879,6 +5879,22 @@
"n_buckets": 50,
"description": "(Bug 1207089) Time in ms between displaying a popup notification and dismissing it without an action the first time, keyed by ID"
},
"PRINT_PREVIEW_OPENED_COUNT": {
"alert_emails": ["carnold@mozilla.org"],
"bug_numbers": [1275570],
"expires_in_version": "56",
"kind": "count",
"releaseChannelCollection": "opt-out",
"description": "A counter incremented every time the browser enters print preview."
},
"PRINT_PREVIEW_SIMPLIFY_PAGE_OPENED_COUNT": {
"alert_emails": ["carnold@mozilla.org"],
"bug_numbers": [1275570],
"expires_in_version": "56",
"kind": "count",
"releaseChannelCollection": "opt-out",
"description": "A counter incremented every time the browser enters simplified mode on print preview."
},
"DEVTOOLS_DEBUGGER_RDP_LOCAL_RELOAD_MS": {
"expires_in_version": "never",
"kind": "exponential",