diff --git a/mobile/android/chrome/content/Reader.js b/mobile/android/chrome/content/Reader.js index 0e4d64db75ae..35ff35e104d2 100644 --- a/mobile/android/chrome/content/Reader.js +++ b/mobile/android/chrome/content/Reader.js @@ -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"); } }, diff --git a/toolkit/components/telemetry/Histograms.json b/toolkit/components/telemetry/Histograms.json index fe566ed27c92..b95a8013c63d 100644 --- a/toolkit/components/telemetry/Histograms.json +++ b/toolkit/components/telemetry/Histograms.json @@ -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"],