Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit c5432a8

Browse files
committed
Bug 1940637 - remove FX_URLBAR_PROVIDER_CLIPBOARD_READ_TIME_MS probe. r=urlbar-reviewers,jteow a=fix
Differential Revision: https://phabricator.services.mozilla.com/D235990
1 parent 57e9ccc commit c5432a8

File tree

3 files changed

+1
-42
lines changed

3 files changed

+1
-42
lines changed

browser/components/urlbar/UrlbarProviderClipboard.sys.mjs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,7 @@ class ProviderClipboard extends UrlbarProvider {
5656
) {
5757
return false;
5858
}
59-
const obj = {};
60-
if (
61-
!TelemetryStopwatch.running(
62-
"FX_URLBAR_PROVIDER_CLIPBOARD_READ_TIME_MS",
63-
obj
64-
)
65-
) {
66-
TelemetryStopwatch.start(
67-
"FX_URLBAR_PROVIDER_CLIPBOARD_READ_TIME_MS",
68-
obj
69-
);
70-
}
7159
let textFromClipboard = controller.browserWindow.readFromClipboard();
72-
TelemetryStopwatch.finish("FX_URLBAR_PROVIDER_CLIPBOARD_READ_TIME_MS", obj);
7360

7461
// Check for spaces in clipboard text to avoid suggesting
7562
// clipboard content including both a url and the following text.

browser/components/urlbar/tests/browser/browser_clipboard.js

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -303,21 +303,12 @@ add_task(async function testClipboardSuggestToggle() {
303303
);
304304
});
305305

306-
add_task(async function testScalarAndStopWatchTelemetry() {
306+
add_task(async function testScalarTelemetry() {
307307
SpecialPowers.clipboardCopyString("https://example.com/6");
308308
await BrowserTestUtils.withNewTab(
309309
{ gBrowser, url: "about:home" },
310310
async () => {
311311
Services.telemetry.clearScalars();
312-
let histogram = Services.telemetry.getHistogramById(
313-
"FX_URLBAR_PROVIDER_CLIPBOARD_READ_TIME_MS"
314-
);
315-
histogram.clear();
316-
Assert.equal(
317-
Object.values(histogram.snapshot().values).length,
318-
0,
319-
"histogram is empty before search"
320-
);
321312

322313
await UrlbarTestUtils.promiseAutocompleteResultPopup({
323314
window,
@@ -343,12 +334,6 @@ add_task(async function testScalarAndStopWatchTelemetry() {
343334
0,
344335
1
345336
);
346-
347-
Assert.greater(
348-
Object.values(histogram.snapshot().values).length,
349-
0,
350-
"histogram updated after search"
351-
);
352337
}
353338
);
354339
});

toolkit/components/telemetry/Histograms.json

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7687,19 +7687,6 @@
76877687
"bug_numbers": [1334615],
76887688
"description": "The input method the user used to select a result in the searchbar. 'enter' => The user hit the Enter key without choosing a result in the popup. 'enterSelection' => The user chose a result and then hit the Enter key. 'click' => The user clicked a result with the mouse."
76897689
},
7690-
"FX_URLBAR_PROVIDER_CLIPBOARD_READ_TIME_MS": {
7691-
"record_in_processes": ["main"],
7692-
"products": ["firefox"],
7693-
"alert_emails": ["fx-search-telemetry@mozilla.com"],
7694-
"expires_in_version": "137",
7695-
"kind": "exponential",
7696-
"low": 16,
7697-
"high": 5000,
7698-
"n_buckets": 8,
7699-
"bug_numbers": [1866710],
7700-
"releaseChannelCollection": "opt-out",
7701-
"description": "Time taken to read data from the clipboard (ms)"
7702-
},
77037690
"INNERWINDOWS_WITH_MUTATION_LISTENERS": {
77047691
"record_in_processes": ["main", "content"],
77057692
"products": ["firefox", "fennec"],

0 commit comments

Comments
 (0)