Bug 1266163 - Replace FENNEC_READER_VIEW_BUTTON histogram with UI telemetry. r=mfinkle,barbara

MozReview-Commit-ID: 1guxvXp6loC

--HG--
extra : rebase_source : a474fb10ef8e197313debb970640f1243b2dfca1
This commit is contained in:
Margaret Leibovic 2016-04-20 15:22:46 -04:00
Родитель 06932c74d1
Коммит 9cf32c5c82
2 изменённых файлов: 4 добавлений и 24 удалений

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

@ -22,19 +22,6 @@ 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
},
/**
* BackPressListener (listeners / ReaderView Ids).
*/
@ -166,9 +153,9 @@ var Reader = {
readerModeCallback: function(browser) {
let url = browser.currentURI.spec;
if (url.startsWith("about:reader")) {
Reader._buttonHistogram.add(Reader._buttonHistogramValues.TAP_EXIT);
UITelemetry.addEvent("action.1", "button", "reader_exit");
} else {
Reader._buttonHistogram.add(Reader._buttonHistogramValues.TAP_ENTER);
UITelemetry.addEvent("action.1", "button", "reader_enter");
}
browser.messageManager.sendAsyncMessage("Reader:ToggleReaderMode");
},
@ -207,9 +194,9 @@ var Reader = {
if (browser.isArticle) {
showPageAction("drawable://reader", Strings.reader.GetStringFromName("readerView.enter"));
this._buttonHistogram.add(this._buttonHistogramValues.SHOWN);
UITelemetry.addEvent("show.1", "button", "reader_available");
} else {
this._buttonHistogram.add(this._buttonHistogramValues.HIDDEN);
UITelemetry.addEvent("show.1", "button", "reader_unavailable");
}
},

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

@ -9476,13 +9476,6 @@
"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": ["mobile-frontend@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)"
},
"FENNEC_LOAD_SAVED_PAGE": {
"expires_in_version": "50",
"alert_emails": ["mobile-frontend@mozilla.com"],