From 8356408ade32817599af8a8daa333e2e3ec5e297 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Qu=C3=A8ze?= Date: Fri, 11 Oct 2024 11:21:46 +0000 Subject: [PATCH] Bug 1923015 - Remove no longer needed addonsManager.reportSuspiciousSite telemetry event, r=chutten,bholley. Differential Revision: https://phabricator.services.mozilla.com/D223502 --- .../tests/browser_midi_permission_gated.js | 24 +++---------------- toolkit/components/telemetry/Events.yaml | 15 ------------ .../mozapps/extensions/AddonManager.sys.mjs | 6 ----- 3 files changed, 3 insertions(+), 42 deletions(-) diff --git a/dom/midi/tests/browser_midi_permission_gated.js b/dom/midi/tests/browser_midi_permission_gated.js index 58add99c0015..0993a4d73090 100644 --- a/dom/midi/tests/browser_midi_permission_gated.js +++ b/dom/midi/tests/browser_midi_permission_gated.js @@ -425,22 +425,7 @@ add_task(async function testRequestMIDIAccess() { "Expected Glean event recorded." ); - // Invoking getAMTelemetryEvents resets the mocked event array, and we want - // to test two different things here, so we cache it. - let events = AddonTestUtils.getAMTelemetryEvents(); - Assert.deepEqual( - events.filter(evt => evt.method == "reportSuspiciousSite")[0], - { - method: "reportSuspiciousSite", - object: "suspiciousSite", - value: "example.com", - extra: undefined, - } - ); - assertSitePermissionInstallTelemetryEvents( - ["site_warning", "cancelled"], - events - ); + assertSitePermissionInstallTelemetryEvents(["site_warning", "cancelled"]); }); add_task(async function testIframeRequestMIDIAccess() { @@ -720,11 +705,8 @@ add_task(function teardown_telemetry_events() { * * @param {Array} expectedSteps: An array of the expected extra.step values recorded. */ -function assertSitePermissionInstallTelemetryEvents( - expectedSteps, - events = null -) { - let amInstallEvents = (events ?? AddonTestUtils.getAMTelemetryEvents()) +function assertSitePermissionInstallTelemetryEvents(expectedSteps) { + let amInstallEvents = AddonTestUtils.getAMTelemetryEvents() .filter(evt => evt.method === "install" && evt.object === "sitepermission") .map(evt => evt.extra.step); diff --git a/toolkit/components/telemetry/Events.yaml b/toolkit/components/telemetry/Events.yaml index 4e56d8604e4e..0d2b33845569 100644 --- a/toolkit/components/telemetry/Events.yaml +++ b/toolkit/components/telemetry/Events.yaml @@ -296,21 +296,6 @@ addonsManager: record_in_processes: ["main"] bug_numbers: [1433335, 1515697, 1523641, 1549770, 1590736, 1630596, 1672570, 1714251, 1749878, 1781974, 1817100, 1861295, 1912166] release_channel_collection: opt-out - reportSuspiciousSite: - description: > - Sent when a user clicks "Report Suspicious Site" on the dropdown menu of the third- - party xpinstall doorhanger. The object is always suspiciousSite. The value is the - site domain, or "(unknown)" if there is no site associated with the prompt. - objects: - - suspiciousSite - notification_emails: ["addons-dev-internal@mozilla.com"] - expiry_version: "140" - products: - - "firefox" - record_in_processes: ["main"] - bug_numbers: [1806056, 1817100, 1861295, 1912166] - release_channel_collection: opt-out - addonsSearchDetection: etld_change: description: | diff --git a/toolkit/mozapps/extensions/AddonManager.sys.mjs b/toolkit/mozapps/extensions/AddonManager.sys.mjs index 4b793324366f..81d81849b300 100644 --- a/toolkit/mozapps/extensions/AddonManager.sys.mjs +++ b/toolkit/mozapps/extensions/AddonManager.sys.mjs @@ -5211,12 +5211,6 @@ AMTelemetry = { */ recordSuspiciousSiteEvent({ displayURI }) { let site = displayURI?.displayHost ?? "(unknown)"; - this.recordEvent({ - method: "reportSuspiciousSite", - object: "suspiciousSite", - value: site, - extra: {}, - }); Glean.addonsManager.reportSuspiciousSite.record( this.formatExtraVars({ suspicious_site: site }) );