diff options
author | stevet@chromium.org <stevet@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-03 14:28:15 +0000 |
---|---|---|
committer | stevet@chromium.org <stevet@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-03 14:28:15 +0000 |
commit | cfb8c555703a92eed3a61e7a4fe91e74451a9221 (patch) | |
tree | bec4b9e02c6704cc16f22f5f19dbb97689decac7 /ash/accelerators/accelerator_commands.cc | |
parent | d89eec809e2d25aee8d386186653699f5017b15b (diff) | |
download | chromium_src-cfb8c555703a92eed3a61e7a4fe91e74451a9221.zip chromium_src-cfb8c555703a92eed3a61e7a4fe91e74451a9221.tar.gz chromium_src-cfb8c555703a92eed3a61e7a4fe91e74451a9221.tar.bz2 |
Record user actions for Ash accelerators.
Clean up the huge switch of accelerators as well:
* Move a bunch of code into Handle helpers.
* Alphabetize the anon namespace helpers.
* Clean up the OS_CHROMEOS groupings a bit.
BUG=321695
R=jamescook@chromium.org
Review URL: https://codereview.chromium.org/78763003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238391 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/accelerators/accelerator_commands.cc')
-rw-r--r-- | ash/accelerators/accelerator_commands.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ash/accelerators/accelerator_commands.cc b/ash/accelerators/accelerator_commands.cc index 003562e..cfbba26 100644 --- a/ash/accelerators/accelerator_commands.cc +++ b/ash/accelerators/accelerator_commands.cc @@ -9,6 +9,7 @@ #include "ash/wm/window_cycle_controller.h" #include "ash/wm/window_state.h" #include "ash/wm/window_util.h" +#include "content/public/browser/user_metrics.h" namespace ash { namespace accelerators { @@ -25,8 +26,8 @@ bool ToggleMinimized() { wm::WindowState* window_state = wm::GetWindowState(window); if (!window_state->CanMinimize()) return false; - ash::Shell::GetInstance()->delegate()->RecordUserMetricsAction( - ash::UMA_MINIMIZE_PER_KEY); + content::RecordAction( + content::UserMetricsAction("Accel_Toggle_Minimized")); window_state->Minimize(); return true; } @@ -35,6 +36,8 @@ void ToggleMaximized() { wm::WindowState* window_state = wm::GetActiveWindowState(); if (!window_state) return; + content::RecordAction( + content::UserMetricsAction("Accel_Toggle_Maximized")); // Get out of fullscreen when in fullscreen mode. if (window_state->IsFullscreen()) ToggleFullscreen(); |