Commit f5e2ea93 authored by Ramya Nagarajan's avatar Ramya Nagarajan Committed by Commit Bot

[Mac] Records UMA enum for IDC_CONTENT_CONTEXT_EMOJI.

Maps an UMA enumeration to IDC so that the existing framework to
log RenderViewContextMenuItem.Shown can be leveraged for this context
menu item. Also explicitly calls RecordUsedItem for the Emoji command,
which logs to RenderViewContextMenuItem.Used.

Bug: 827404
Change-Id: I977bea6d6c6a012d048c886f8982d2b7df341a5b
Reviewed-on: https://chromium-review.googlesource.com/1036645Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Ramya Nagarajan <ramyan@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555186}
parent 03d03c05
...@@ -336,10 +336,11 @@ const struct UmaEnumCommandIdPair { ...@@ -336,10 +336,11 @@ const struct UmaEnumCommandIdPair {
{89, -1, IDC_CONTENT_CONTEXT_OPENLINKBOOKMARKAPP}, {89, -1, IDC_CONTENT_CONTEXT_OPENLINKBOOKMARKAPP},
{90, -1, IDC_CONTENT_CONTEXT_SHOWALLSAVEDPASSWORDS}, {90, -1, IDC_CONTENT_CONTEXT_SHOWALLSAVEDPASSWORDS},
{91, -1, IDC_CONTENT_CONTENT_PICTUREINPICTURE}, {91, -1, IDC_CONTENT_CONTENT_PICTUREINPICTURE},
{92, -1, IDC_CONTENT_CONTEXT_EMOJI},
// Add new items here and use |enum_id| from the next line. // Add new items here and use |enum_id| from the next line.
// Also, add new items to RenderViewContextMenuItem enum in // Also, add new items to RenderViewContextMenuItem enum in
// tools/metrics/histograms/enums.xml. // tools/metrics/histograms/enums.xml.
{92, -1, 0}, // Must be the last. Increment |enum_id| when new IDC {93, -1, 0}, // Must be the last. Increment |enum_id| when new IDC
// was added. // was added.
}; };
......
...@@ -200,6 +200,7 @@ void RenderViewContextMenuMac::ExecuteCommand(int command_id, int event_flags) { ...@@ -200,6 +200,7 @@ void RenderViewContextMenuMac::ExecuteCommand(int command_id, int event_flags) {
switch (command_id) { switch (command_id) {
case IDC_CONTENT_CONTEXT_EMOJI: case IDC_CONTENT_CONTEXT_EMOJI:
[NSApp orderFrontCharacterPalette:nil]; [NSApp orderFrontCharacterPalette:nil];
RenderViewContextMenu::RecordUsedItem(command_id);
break; break;
case IDC_CONTENT_CONTEXT_LOOK_UP: case IDC_CONTENT_CONTEXT_LOOK_UP:
......
...@@ -39006,6 +39006,7 @@ Called by update_net_trust_anchors.py.--> ...@@ -39006,6 +39006,7 @@ Called by update_net_trust_anchors.py.-->
<int value="89" label="IDC_CONTENT_CONTEXT_OPENLINKBOOKMARKAPP"/> <int value="89" label="IDC_CONTENT_CONTEXT_OPENLINKBOOKMARKAPP"/>
<int value="90" label="IDC_CONTENT_CONTEXT_SHOWALLSAVEDPASSWORDS"/> <int value="90" label="IDC_CONTENT_CONTEXT_SHOWALLSAVEDPASSWORDS"/>
<int value="91" label="IDC_CONTENT_CONTENT_PICTUREINPICTURE"/> <int value="91" label="IDC_CONTENT_CONTENT_PICTUREINPICTURE"/>
<int value="92" label="IDC_CONTENT_CONTEXT_EMOJI"/>
</enum> </enum>
<enum name="ReportingHeaderEndpointGroupOutcome"> <enum name="ReportingHeaderEndpointGroupOutcome">
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment