Skip to content

Commit

Permalink
[Code Health] Remove expired histograms BookmarkManager.CommandMenuOp…
Browse files Browse the repository at this point in the history
…ened

Bug: 1385068
Change-Id: I7d520f3e40198b4678580a824ac1f76a2a6f169b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4314059
Commit-Queue: Wissem Gamra <[email protected]>
Reviewed-by: manuk hovanesian <[email protected]>
Reviewed-by: John Lee <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1117176}
  • Loading branch information
Wissem Gamra authored and Chromium LUCI CQ committed Mar 14, 2023
1 parent 35a87e3 commit 9454a41
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 26 deletions.
3 changes: 0 additions & 3 deletions chrome/browser/resources/bookmarks/command_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -777,9 +777,6 @@ export class BookmarksCommandManagerElement extends
} else {
this.openCommandMenuAtPosition(e.detail.x!, e.detail.y!, e.detail.source);
}
this.browserProxy_.recordInHistogram(
'BookmarkManager.CommandMenuOpened', e.detail.source,
MenuSource.NUM_VALUES);
}

private onCommandClick_(e: Event) {
Expand Down
4 changes: 1 addition & 3 deletions chrome/browser/resources/bookmarks/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ export enum Command {
}

/**
* Where the menu was opened from. This enum is also used for metrics and should
* be kept in sync with BookmarkManagerMenuSource in enums.xml. Values must
* never be renumbered or reused.
* Where the menu was opened from. Values must never be renumbered or reused.
*/
export enum MenuSource {
NONE = 0,
Expand Down
3 changes: 0 additions & 3 deletions chrome/test/data/webui/bookmarks/list_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,14 +218,11 @@ suite('<bookmarks-list> command manager integration test', function() {
test('show context menu', async () => {
const commandManager =
app.shadowRoot!.querySelector('bookmarks-command-manager')!;
proxy.resetResolver('recordInHistogram');
const list = app.shadowRoot!.querySelector('bookmarks-list')!;
list.dispatchEvent(new CustomEvent(
'contextmenu',
{bubbles: true, composed: true, detail: {clientX: 0, clientY: 0}}));

await proxy.whenCalled('recordInHistogram');

assertEquals(MenuSource.LIST, commandManager.getMenuSourceForTesting());
const menuCommands =
commandManager.shadowRoot!.querySelectorAll('.dropdown-item');
Expand Down
8 changes: 0 additions & 8 deletions tools/metrics/histograms/enums.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11761,14 +11761,6 @@ Called by update_bad_message_reasons.py.-->
<int value="22" label="Open folder (via double-click / enter)"/>
</enum>

<enum name="BookmarkManagerMenuSource">
<int value="0" label="None"/>
<int value="1" label="Item"/>
<int value="2" label="Tree"/>
<int value="3" label="Toolbar"/>
<int value="4" label="List"/>
</enum>

<enum name="BookmarksEntryPoint">
<int value="0" label="Accelerator(Ctrl+D)"/>
<int value="1" label="Gesture"/>
Expand Down
9 changes: 0 additions & 9 deletions tools/metrics/histograms/metadata/bookmarks/histograms.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,6 @@ [email protected].
</summary>
</histogram>

<histogram name="BookmarkManager.CommandMenuOpened"
enum="BookmarkManagerMenuSource" expires_after="2020-06-14">
<owner>[email protected]</owner>
<summary>
Logs where the menu was opened from when a user action opens the command
menu in the bookmark manager.
</summary>
</histogram>

<histogram name="BookmarkManager.NumDragged" units="bookmarks"
expires_after="M85">
<owner>[email protected]</owner>
Expand Down

0 comments on commit 9454a41

Please sign in to comment.