Bug 1923015 - Remove no longer needed addonsManager.reportSuspiciousSite telemetry event, r=chutten,bholley.

Differential Revision: https://phabricator.services.mozilla.com/D223502
This commit is contained in:
Florian Quèze 2024-10-11 11:21:46 +00:00
parent be70742a00
commit 8356408ade
3 changed files with 3 additions and 42 deletions

View File

@ -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<String>} 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);

View File

@ -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: |

View File

@ -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 })
);