From e3719ec517645a17224d2f3e5d3320ea77952719 Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Thu, 21 Jun 2018 20:09:48 -0400 Subject: Remove BrowserUITelemetry from Basilisk application --- .../basilisk/base/content/browser-context.inc | 3 -- .../basilisk/base/content/browser-sidebar.js | 6 --- application/basilisk/base/content/browser.js | 16 ------ application/basilisk/base/content/nsContextMenu.js | 62 ---------------------- application/basilisk/base/content/tabbrowser.xml | 2 - 5 files changed, 89 deletions(-) (limited to 'application/basilisk/base') diff --git a/application/basilisk/base/content/browser-context.inc b/application/basilisk/base/content/browser-context.inc index 9fa90b11c..36e0478af 100644 --- a/application/basilisk/base/content/browser-context.inc +++ b/application/basilisk/base/content/browser-context.inc @@ -3,9 +3,6 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -# NB: IF YOU ADD ITEMS TO THIS FILE, PLEASE UPDATE THE WHITELIST IN -# BrowserUITelemetry.jsm. SEE BUG 991757 FOR DETAILS. - { - aXulMenu.ownerDocument.removeEventListener("command", activationHandler, true); - aXulMenu.removeEventListener("popuphiding", this._onPopupHiding, true); - delete this._onPopupHiding; - - let eventKey = [ - this._telemetryPageContext, - this._telemetryHadCustomItems ? "withcustom" : "withoutcustom" - ]; - let target = this._telemetryClickID || "close-without-interaction"; - BrowserUITelemetry.registerContextMenuInteraction(eventKey, target); - }; - let activationHandler = (e) => { - // Deal with command events being routed to command elements; figure out - // what triggered the event (which will have the right e.target) - if (e.sourceEvent) { - e = e.sourceEvent; - } - // Target should be in the menu (this catches using shortcuts for items - // not in the menu while the menu is up) - if (!aXulMenu.contains(e.target)) { - return; - } - - // Check if this is a page menu item: - if (e.target.hasAttribute(PageMenuParent.GENERATEDITEMID_ATTR)) { - this._telemetryClickID = "custom-page-item"; - } else { - this._telemetryClickID = (e.target.id || "unknown").replace(/^context-/i, ""); - } - }; - aXulMenu.ownerDocument.addEventListener("command", activationHandler, true); - aXulMenu.addEventListener("popuphiding", this._onPopupHiding, true); - }, - - _getTelemetryPageContextInfo: function() { - let rv = []; - for (let k of ["isContentSelected", "onLink", "onImage", "onCanvas", "onVideo", "onAudio", - "onTextInput"]) { - if (this[k]) { - rv.push(k.replace(/^(?:is|on)(.)/, (match, firstLetter) => firstLetter.toLowerCase())); - } - } - if (!rv.length) { - rv.push('other'); - } - - return JSON.stringify(rv); - }, - - _checkTelemetryForMenu: function(aXulMenu) { - this._telemetryClickID = null; - this._telemetryPageContext = this._getTelemetryPageContextInfo(); - this._telemetryHadCustomItems = this.hasPageMenu; - this._getTelemetryClickInfo(aXulMenu); - }, - createContainerMenu: function(aEvent) { return createUserContextMenu(aEvent, true, gContextMenuContentData.userContextId); diff --git a/application/basilisk/base/content/tabbrowser.xml b/application/basilisk/base/content/tabbrowser.xml index 463e74a52..f8dbcf364 100644 --- a/application/basilisk/base/content/tabbrowser.xml +++ b/application/basilisk/base/content/tabbrowser.xml @@ -6878,11 +6878,9 @@ if (browser.audioMuted) { browser.unmute(); this.removeAttribute("muted"); - BrowserUITelemetry.countTabMutingEvent("unmute", aMuteReason); } else { browser.mute(); this.setAttribute("muted", "true"); - BrowserUITelemetry.countTabMutingEvent("mute", aMuteReason); } this.muteReason = aMuteReason || null; modifiedAttrs.push("muted"); -- cgit v1.2.3