Chromium Code Reviews| Index: chrome/browser/ui/toolbar/wrench_menu_model.h | 
| diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.h b/chrome/browser/ui/toolbar/wrench_menu_model.h | 
| index ff787c8c2ff2a3a114a1c38cef68099292149773..cc8f4020e84ee2671ea558d6d078e5a688e4a70e 100644 | 
| --- a/chrome/browser/ui/toolbar/wrench_menu_model.h | 
| +++ b/chrome/browser/ui/toolbar/wrench_menu_model.h | 
| @@ -7,6 +7,8 @@ | 
| #include "base/files/file_path.h" | 
| #include "base/memory/scoped_ptr.h" | 
| +#include "base/time/time.h" | 
| +#include "base/timer/elapsed_timer.h" | 
| #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" | 
| #include "content/public/browser/host_zoom_map.h" | 
| #include "content/public/browser/notification_observer.h" | 
| @@ -24,6 +26,54 @@ namespace { | 
| class MockWrenchMenuModel; | 
| } // namespace | 
| +enum WrenchMenuAction { | 
| + MENU_ACTION_NEW_TAB = 0, | 
| + MENU_ACTION_NEW_WINDOW, | 
| + MENU_ACTION_NEW_INCOGNITO_WINDOW, | 
| + MENU_ACTION_SHOW_BOOKMARK_BAR, | 
| + MENU_ACTION_SHOW_BOOKMARK_MANAGER, | 
| + MENU_ACTION_IMPORT_SETTINGS, | 
| + MENU_ACTION_BOOKMARK_PAGE, | 
| + MENU_ACTION_BOOKMARK_ALL_TABS, | 
| + MENU_ACTION_PIN_TO_START_SCREEN, | 
| + MENU_ACTION_RESTORE_TAB, | 
| + MENU_ACTION_WIN_DESKTOP_RESTART, | 
| + MENU_ACTION_WIN8_METRO_RESTART, | 
| + MENU_ACTION_WIN_CHROMEOS_RESTART, | 
| + MENU_ACTION_DISTILL_PAGE, | 
| + MENU_ACTION_SAVE_PAGE, | 
| + MENU_ACTION_FIND, | 
| + MENU_ACTION_PRINT, | 
| + MENU_ACTION_CUT, | 
| + MENU_ACTION_COPY, | 
| + MENU_ACTION_PASTE, | 
| + MENU_ACTION_CREATE_HOSTED_APP, | 
| + MENU_ACTION_CREATE_SHORTCUTS, | 
| + MENU_ACTION_MANAGE_EXTENSIONS, | 
| + MENU_ACTION_TASK_MANAGER, | 
| + MENU_ACTION_CLEAR_BROWSING_DATA, | 
| + MENU_ACTION_VIEW_SOURCE, | 
| + MENU_ACTION_DEV_TOOLS, | 
| + MENU_ACTION_DEV_TOOLS_CONSOLE, | 
| + MENU_ACTION_DEV_TOOLS_DEVICES, | 
| + MENU_ACTION_PROFILING_ENABLED, | 
| + MENU_ACTION_ZOOM_MINUS, | 
| + MENU_ACTION_ZOOM_PLUS, | 
| + MENU_ACTION_FULLSCREEN, | 
| + MENU_ACTION_SHOW_HISTORY, | 
| + MENU_ACTION_SHOW_DOWNLOADS, | 
| + MENU_ACTION_SHOW_SYNC_SETUP, | 
| + MENU_ACTION_OPTIONS, | 
| + MENU_ACTION_ABOUT, | 
| + MENU_ACTION_HELP_PAGE_VIA_MENU, | 
| + MENU_ACTION_FEEDBACK, | 
| + MENU_ACTION_TOGGLE_REQUEST_TABLET_SITE, | 
| + MENU_ACTION_EXIT, | 
| + MENU_ACTION_RECENT_TAB, | 
| + MENU_ACTION_BOOKMARK_OPEN, | 
| + LIMIT_MENU_ACTION | 
| +}; | 
| + | 
| // A menu model that builds the contents of an encoding menu. | 
| class EncodingMenuModel : public ui::SimpleMenuModel, | 
| public ui::SimpleMenuModel::Delegate { | 
| @@ -157,6 +207,15 @@ class WrenchMenuModel : public ui::SimpleMenuModel, | 
| bool ShouldShowNewIncognitoWindowMenuItem(); | 
| + // Log UMA metrics for each command clicked on. | 
| 
 
Peter Kasting
2014/11/14 19:48:59
Nit: Grammar (and specificity).  How about: "Calle
 
edwardjung
2014/11/17 15:58:23
Done.
 
 | 
| + void LogMenuMetrics(int command_id); | 
| + | 
| + // Time menu wasopened for. | 
| 
 
Peter Kasting
2014/11/14 19:48:59
Nit: was opened for before what?  Be much more spe
 
edwardjung
2014/11/17 15:58:24
Done.
 
 | 
| + base::ElapsedTimer timer_; | 
| + | 
| + // Whether a UMA menu action has been recorded. | 
| 
 
Peter Kasting
2014/11/14 19:48:59
Nit: Has been recorded since when?  Menu open?  Ev
 
edwardjung
2014/11/17 15:58:24
Done.
 
 | 
| + bool uma_action_recorded_; | 
| + | 
| // Models for the special menu items with buttons. | 
| scoped_ptr<ui::ButtonMenuItemModel> edit_menu_item_model_; | 
| scoped_ptr<ui::ButtonMenuItemModel> zoom_menu_item_model_; |