Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2496)

Unified Diff: ash/shelf/shelf_alignment_menu.cc

Issue 26373009: ash:Shelf - Added UMA stats for ShelfAlignment (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more specific UMA counts Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ash/shelf/shelf_alignment_menu.cc
diff --git a/ash/shelf/shelf_alignment_menu.cc b/ash/shelf/shelf_alignment_menu.cc
index d0d381ff645af649c2823db3f30cb5cd9aad6515..bc1e7702da6615cb93abd045d23dc923091ef6b3 100644
--- a/ash/shelf/shelf_alignment_menu.cc
+++ b/ash/shelf/shelf_alignment_menu.cc
@@ -7,6 +7,7 @@
#include "ash/shelf/shelf_layout_manager.h"
#include "ash/shelf/shelf_types.h"
#include "ash/shell.h"
+#include "ash/shell_delegate.h"
#include "grit/ash_strings.h"
#include "ui/aura/root_window.h"
#include "ui/base/l10n/l10n_util.h"
@@ -54,14 +55,20 @@ bool ShelfAlignmentMenu::GetAcceleratorForCommandId(
void ShelfAlignmentMenu::ExecuteCommand(int command_id, int event_flags) {
switch (static_cast<MenuItem>(command_id)) {
case MENU_ALIGN_LEFT:
+ Shell::GetInstance()->delegate()->RecordUserMetricsAction(
+ UMA_SHELF_ALIGNMENT_SET_LEFT);
Shell::GetInstance()->SetShelfAlignment(SHELF_ALIGNMENT_LEFT,
root_window_);
break;
case MENU_ALIGN_BOTTOM:
+ Shell::GetInstance()->delegate()->RecordUserMetricsAction(
+ UMA_SHELF_ALIGNMENT_SET_BOTTOM);
Shell::GetInstance()->SetShelfAlignment(SHELF_ALIGNMENT_BOTTOM,
root_window_);
break;
case MENU_ALIGN_RIGHT:
+ Shell::GetInstance()->delegate()->RecordUserMetricsAction(
+ UMA_SHELF_ALIGNMENT_SET_RIGHT);
Shell::GetInstance()->SetShelfAlignment(SHELF_ALIGNMENT_RIGHT,
root_window_);
break;

Powered by Google App Engine
This is Rietveld 408576698