Commit 5d92e11c authored by Leonard Grey's avatar Leonard Grey Committed by Commit Bot

Don't try to record histogram when showing context menu submenus

Submenus don't have command IDs AFAICT, so this will always fail.

Bug: None
Change-Id: I5bc7c4292c02f515fd11594b69871d2cbf342627
Reviewed-on: https://chromium-review.googlesource.com/1195829Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Commit-Queue: Leonard Grey <lgrey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587572}
parent 34d106c9
......@@ -361,7 +361,8 @@ void RenderViewContextMenuBase::ExecuteCommand(int id, int event_flags) {
void RenderViewContextMenuBase::MenuWillShow(ui::SimpleMenuModel* source) {
for (int i = 0; i < source->GetItemCount(); ++i) {
if (source->IsVisibleAt(i) &&
source->GetTypeAt(i) != ui::MenuModel::TYPE_SEPARATOR) {
source->GetTypeAt(i) != ui::MenuModel::TYPE_SEPARATOR &&
source->GetTypeAt(i) != ui::MenuModel::TYPE_SUBMENU) {
RecordShownItem(source->GetCommandIdAt(i));
}
}
......
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