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

Unified Diff: ash/wm/maximize_mode/maximize_mode_controller.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/wm/lock_state_controller.cc ('k') | ash/wm/panels/panel_window_event_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/maximize_mode/maximize_mode_controller.cc
diff --git a/ash/wm/maximize_mode/maximize_mode_controller.cc b/ash/wm/maximize_mode/maximize_mode_controller.cc
index 2cc2fcf55d6cc32f72dbda4cbd6e1dff9ce283af..5f4b32a429f9d460287b3e8a53f63b976c8c8667 100644
--- a/ash/wm/maximize_mode/maximize_mode_controller.cc
+++ b/ash/wm/maximize_mode/maximize_mode_controller.cc
@@ -108,9 +108,7 @@ MaximizeModeController::MaximizeModeController()
#endif
lid_is_closed_(false) {
WmShell::Get()->AddShellObserver(this);
- Shell* shell = Shell::GetInstance();
- shell->metrics()->RecordUserMetricsAction(
- ash::UMA_MAXIMIZE_MODE_INITIALLY_DISABLED);
+ WmShell::Get()->RecordUserMetricsAction(UMA_MAXIMIZE_MODE_INITIALLY_DISABLED);
#if defined(OS_CHROMEOS)
// TODO(jonross): Do not create MaximizeModeController if the flag is
@@ -120,7 +118,7 @@ MaximizeModeController::MaximizeModeController()
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kAshEnableTouchView)) {
chromeos::AccelerometerReader::GetInstance()->AddObserver(this);
- shell->window_tree_host_manager()->AddObserver(this);
+ Shell::GetInstance()->window_tree_host_manager()->AddObserver(this);
}
chromeos::DBusThreadManager::Get()->
GetPowerManagerClient()->AddObserver(this);
@@ -168,11 +166,11 @@ void MaximizeModeController::EnableMaximizeModeWindowManager(
maximize_mode_window_manager_.reset(new MaximizeModeWindowManager());
// TODO(jonross): Move the maximize mode notifications from ShellObserver
// to MaximizeModeController::Observer
- shell->metrics()->RecordUserMetricsAction(ash::UMA_MAXIMIZE_MODE_ENABLED);
+ WmShell::Get()->RecordUserMetricsAction(UMA_MAXIMIZE_MODE_ENABLED);
shell->OnMaximizeModeStarted();
} else {
maximize_mode_window_manager_.reset();
- shell->metrics()->RecordUserMetricsAction(ash::UMA_MAXIMIZE_MODE_DISABLED);
+ WmShell::Get()->RecordUserMetricsAction(UMA_MAXIMIZE_MODE_DISABLED);
shell->OnMaximizeModeEnded();
}
}
« no previous file with comments | « ash/wm/lock_state_controller.cc ('k') | ash/wm/panels/panel_window_event_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698