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

Unified Diff: ash/shelf/shelf_button_pressed_metric_tracker.cc

Issue 2099443002: Migrate simple ash Shell metrics users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix win compile error. Created 4 years, 6 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
« no previous file with comments | « ash/metrics/desktop_task_switch_metric_recorder.cc ('k') | ash/shelf/shelf_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_button_pressed_metric_tracker.cc
diff --git a/ash/shelf/shelf_button_pressed_metric_tracker.cc b/ash/shelf/shelf_button_pressed_metric_tracker.cc
index 00fab2cc57c0965dcb2519cb0e4567b8420a6403..096972d6ec74c3494615a68ba257d4dc5cd0f58a 100644
--- a/ash/shelf/shelf_button_pressed_metric_tracker.cc
+++ b/ash/shelf/shelf_button_pressed_metric_tracker.cc
@@ -4,8 +4,7 @@
#include "ash/shelf/shelf_button_pressed_metric_tracker.h"
-#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/shell.h"
+#include "ash/common/wm_shell.h"
#include "base/metrics/histogram_macros.h"
#include "base/time/default_tick_clock.h"
#include "ui/views/controls/button/button.h"
@@ -51,10 +50,10 @@ void ShelfButtonPressedMetricTracker::ButtonPressed(
void ShelfButtonPressedMetricTracker::RecordButtonPressedSource(
const ui::Event& event) {
if (event.IsMouseEvent()) {
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
+ WmShell::Get()->RecordUserMetricsAction(
UMA_LAUNCHER_BUTTON_PRESSED_WITH_MOUSE);
} else if (event.IsGestureEvent()) {
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
+ WmShell::Get()->RecordUserMetricsAction(
UMA_LAUNCHER_BUTTON_PRESSED_WITH_TOUCH);
}
}
@@ -66,16 +65,13 @@ void ShelfButtonPressedMetricTracker::RecordButtonPressedAction(
case ShelfItemDelegate::kAppListMenuShown:
break;
case ShelfItemDelegate::kNewWindowCreated:
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- UMA_LAUNCHER_LAUNCH_TASK);
+ WmShell::Get()->RecordUserMetricsAction(UMA_LAUNCHER_LAUNCH_TASK);
break;
case ShelfItemDelegate::kExistingWindowActivated:
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- UMA_LAUNCHER_SWITCH_TASK);
+ WmShell::Get()->RecordUserMetricsAction(UMA_LAUNCHER_SWITCH_TASK);
break;
case ShelfItemDelegate::kExistingWindowMinimized:
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- UMA_LAUNCHER_MINIMIZE_TASK);
+ WmShell::Get()->RecordUserMetricsAction(UMA_LAUNCHER_MINIMIZE_TASK);
break;
}
}
« no previous file with comments | « ash/metrics/desktop_task_switch_metric_recorder.cc ('k') | ash/shelf/shelf_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698