Chromium Code Reviews| Index: ash/launcher/launcher_view.cc |
| diff --git a/ash/launcher/launcher_view.cc b/ash/launcher/launcher_view.cc |
| index 4279c3c569019121323b1b401f8129709bfae1bd..8d8fc1f054dcd7091973f4ed4c479f26be07e802 100644 |
| --- a/ash/launcher/launcher_view.cc |
| +++ b/ash/launcher/launcher_view.cc |
| @@ -27,6 +27,7 @@ |
| #include "ash/shell_delegate.h" |
| #include "base/auto_reset.h" |
| #include "base/memory/scoped_ptr.h" |
| +#include "base/metrics/histogram.h" |
| #include "grit/ash_resources.h" |
| #include "grit/ash_strings.h" |
| #include "ui/aura/client/screen_position_client.h" |
| @@ -58,6 +59,11 @@ using views::View; |
| namespace ash { |
| namespace internal { |
| +const int SHELF_ALIGNMENT_UMA_ENUM_VALUE_BOTTOM = 0; |
| +const int SHELF_ALIGNMENT_UMA_ENUM_VALUE_LEFT = 1; |
| +const int SHELF_ALIGNMENT_UMA_ENUM_VALUE_RIGHT = 2; |
| +const int SHELF_ALIGNMENT_UMA_ENUM_VALUE_COUNT = 3; |
| + |
| // Default amount content is inset on the left edge. |
| const int kDefaultLeadingInset = 8; |
| @@ -1554,6 +1560,13 @@ void LauncherView::PointerPressedOnButton(views::View* view, |
| ShelfLayoutManager* shelf = tooltip_->shelf_layout_manager(); |
| + UMA_HISTOGRAM_ENUMERATION("Ash.ShelfAlignmentUsage", |
|
James Cook
2013/10/16 23:35:27
This feels like the wrong way to do this. It will
|
| + shelf->SelectValueForShelfAlignment(SHELF_ALIGNMENT_UMA_ENUM_VALUE_BOTTOM, |
| + SHELF_ALIGNMENT_UMA_ENUM_VALUE_LEFT, |
| + SHELF_ALIGNMENT_UMA_ENUM_VALUE_RIGHT, |
| + -1), |
| + SHELF_ALIGNMENT_UMA_ENUM_VALUE_COUNT); |
| + |
| drag_view_ = view; |
| drag_offset_ = shelf->PrimaryAxisValue(event.x(), event.y()); |
| } |