Commit 03410523 authored by Matthew Mourgos's avatar Matthew Mourgos Committed by Commit Bot

cros: Execute context menu on app list button records as non app.

Bug: 955204
Change-Id: I4e8cf28043c429cb8422809c3d3e1b70a3d351de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1602976
Commit-Queue: Matthew Mourgos <mmourgos@chromium.org>
Reviewed-by: default avatarAlex Newcomer <newcomer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#658278}
parent 226a83f9
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include "ash/app_menu/app_menu_model_adapter.h" #include "ash/app_menu/app_menu_model_adapter.h"
#include "ash/app_menu/notification_menu_controller.h" #include "ash/app_menu/notification_menu_controller.h"
#include "ash/public/cpp/shelf_model.h"
#include "base/metrics/histogram_functions.h" #include "base/metrics/histogram_functions.h"
#include "base/metrics/histogram_macros.h" #include "base/metrics/histogram_macros.h"
#include "ui/base/models/simple_menu_model.h" #include "ui/base/models/simple_menu_model.h"
...@@ -100,16 +101,17 @@ void AppMenuModelAdapter::OnMenuClosed(views::MenuItemView* menu) { ...@@ -100,16 +101,17 @@ void AppMenuModelAdapter::OnMenuClosed(views::MenuItemView* menu) {
} }
void AppMenuModelAdapter::RecordExecuteCommandHistogram(int command_id) { void AppMenuModelAdapter::RecordExecuteCommandHistogram(int command_id) {
base::UmaHistogramSparse(app_id().empty() ? kNonAppContextMenuExecuteCommand const bool is_not_from_app = app_id().empty() || app_id() == kAppListId;
: kAppContextMenuExecuteCommand, base::UmaHistogramSparse(is_not_from_app ? kNonAppContextMenuExecuteCommand
: kAppContextMenuExecuteCommand,
command_id); command_id);
if (is_tablet_mode_) { if (is_tablet_mode_) {
base::UmaHistogramSparse(app_id().empty() base::UmaHistogramSparse(is_not_from_app
? kNonAppContextMenuExecuteCommandInTablet ? kNonAppContextMenuExecuteCommandInTablet
: kAppContextMenuExecuteCommandInTablet, : kAppContextMenuExecuteCommandInTablet,
command_id); command_id);
} else { } else {
base::UmaHistogramSparse(app_id().empty() base::UmaHistogramSparse(is_not_from_app
? kNonAppContextMenuExecuteCommandInClamshell ? kNonAppContextMenuExecuteCommandInClamshell
: kAppContextMenuExecuteCommandInClamshell, : kAppContextMenuExecuteCommandInClamshell,
command_id); command_id);
......
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