mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1219240 - Telemetry probe to measure user interaction with reader view button. r=mfinkle,vladan
This commit is contained in:
parent
f5bc06c640
commit
741ca6ed56
@ -20,6 +20,20 @@ var Reader = {
|
||||
return this._hasUsedToolbar = Services.prefs.getBoolPref("reader.has_used_toolbar");
|
||||
},
|
||||
|
||||
get _buttonHistogram() {
|
||||
delete this._buttonHistogram;
|
||||
return this._buttonHistogram = Services.telemetry.getHistogramById("FENNEC_READER_VIEW_BUTTON");
|
||||
},
|
||||
|
||||
// Values for "FENNEC_READER_VIEW_BUTTON" histogram.
|
||||
_buttonHistogramValues: {
|
||||
HIDDEN: 0,
|
||||
SHOWN: 1,
|
||||
TAP_ENTER: 2,
|
||||
TAP_EXIT: 3,
|
||||
LONG_TAP: 4
|
||||
},
|
||||
|
||||
/**
|
||||
* BackPressListener (listeners / ReaderView Ids).
|
||||
*/
|
||||
@ -202,14 +216,17 @@ var Reader = {
|
||||
} else {
|
||||
browser.loadURI(originalURL);
|
||||
}
|
||||
Reader._buttonHistogram.add(Reader._buttonHistogramValues.TAP_EXIT);
|
||||
} else {
|
||||
browser.messageManager.sendAsyncMessage("Reader:ParseDocument", { url: url });
|
||||
Reader._buttonHistogram.add(Reader._buttonHistogramValues.TAP_ENTER);
|
||||
}
|
||||
},
|
||||
|
||||
readerModeActiveCallback: function(tabID) {
|
||||
Reader._addTabToReadingList(tabID).catch(e => Cu.reportError("Error adding tab to reading list: " + e));
|
||||
UITelemetry.addEvent("save.1", "pageaction", null, "reader");
|
||||
Reader._buttonHistogram.add(Reader._buttonHistogramValues.LONG_TAP);
|
||||
},
|
||||
},
|
||||
|
||||
@ -247,6 +264,9 @@ var Reader = {
|
||||
|
||||
if (browser.isArticle) {
|
||||
showPageAction("drawable://reader", Strings.reader.GetStringFromName("readerView.enter"));
|
||||
this._buttonHistogram.add(this._buttonHistogramValues.SHOWN);
|
||||
} else {
|
||||
this._buttonHistogram.add(this._buttonHistogramValues.HIDDEN);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -9086,6 +9086,7 @@
|
||||
},
|
||||
"READER_MODE_SERIALIZE_DOM_MS": {
|
||||
"expires_in_version": "50",
|
||||
"alert_emails": ["mleibovic@mozilla.com"],
|
||||
"kind": "exponential",
|
||||
"high": "5000",
|
||||
"n_buckets": 15,
|
||||
@ -9093,6 +9094,7 @@
|
||||
},
|
||||
"READER_MODE_WORKER_PARSE_MS": {
|
||||
"expires_in_version": "50",
|
||||
"alert_emails": ["mleibovic@mozilla.com"],
|
||||
"kind": "exponential",
|
||||
"high": "10000",
|
||||
"n_buckets": 30,
|
||||
@ -9100,6 +9102,7 @@
|
||||
},
|
||||
"READER_MODE_DOWNLOAD_MS": {
|
||||
"expires_in_version": "50",
|
||||
"alert_emails": ["mleibovic@mozilla.com"],
|
||||
"kind": "exponential",
|
||||
"low": 50,
|
||||
"high": "40000",
|
||||
@ -9108,16 +9111,25 @@
|
||||
},
|
||||
"READER_MODE_PARSE_RESULT" : {
|
||||
"expires_in_version": "50",
|
||||
"alert_emails": ["mleibovic@mozilla.com"],
|
||||
"kind": "enumerated",
|
||||
"n_values": 5,
|
||||
"description": "The result of trying to parse a document to show in reader view (0=Success, 1=Error too many elements, 2=Error in worker, 3=Error no article)"
|
||||
},
|
||||
"READER_MODE_DOWNLOAD_RESULT" : {
|
||||
"expires_in_version": "50",
|
||||
"alert_emails": ["mleibovic@mozilla.com"],
|
||||
"kind": "enumerated",
|
||||
"n_values": 5,
|
||||
"description": "The result of trying to download a document to show in reader view (0=Success, 1=Error XHR, 2=Error no document)"
|
||||
},
|
||||
"FENNEC_READER_VIEW_BUTTON" : {
|
||||
"expires_in_version": "50",
|
||||
"alert_emails": ["mleibovic@mozilla.com"],
|
||||
"kind": "enumerated",
|
||||
"n_values": 10,
|
||||
"description": "Bug 1219240: Measures user interaction with the reader view button (0=Button hidden, 1=Button shown, 2=Tap to enter reader view, 3=Tap to exit reader view, 4=Long tap)"
|
||||
},
|
||||
"PERMISSIONS_SQL_CORRUPTED": {
|
||||
"expires_in_version": "never",
|
||||
"kind": "count",
|
||||
|
Loading…
Reference in New Issue
Block a user