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

Unified Diff: ash/common/accelerators/accelerator_controller.cc

Issue 2724163002: ash: Use enum for SessionController::CycleActiveUser (Closed)
Patch Set: fix ash_shell_with_content compile Created 3 years, 10 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 | « no previous file | ash/common/session/session_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/accelerators/accelerator_controller.cc
diff --git a/ash/common/accelerators/accelerator_controller.cc b/ash/common/accelerators/accelerator_controller.cc
index 2c3e2f353fbf82d66f0ec4cadb39c375234525cd..7db8bb0947bac6fab1a5099300d262e707731add 100644
--- a/ash/common/accelerators/accelerator_controller.cc
+++ b/ash/common/accelerators/accelerator_controller.cc
@@ -415,18 +415,18 @@ bool CanHandleCycleUser() {
WmShell::Get()->GetSessionStateDelegate()->NumberOfLoggedInUsers() > 1;
}
-void HandleCycleUser(SessionStateDelegate::CycleUser cycle_user) {
+void HandleCycleUser(CycleUserDirection direction) {
MultiProfileUMA::RecordSwitchActiveUser(
MultiProfileUMA::SWITCH_ACTIVE_USER_BY_ACCELERATOR);
- switch (cycle_user) {
- case SessionStateDelegate::CYCLE_TO_NEXT_USER:
+ switch (direction) {
+ case CycleUserDirection::NEXT:
base::RecordAction(UserMetricsAction("Accel_Switch_To_Next_User"));
break;
- case SessionStateDelegate::CYCLE_TO_PREVIOUS_USER:
+ case CycleUserDirection::PREVIOUS:
base::RecordAction(UserMetricsAction("Accel_Switch_To_Previous_User"));
break;
}
- WmShell::Get()->GetSessionStateDelegate()->CycleActiveUser(cycle_user);
+ WmShell::Get()->GetSessionStateDelegate()->CycleActiveUser(direction);
}
bool CanHandleToggleCapsLock(const ui::Accelerator& accelerator,
@@ -1025,10 +1025,10 @@ void AcceleratorController::PerformAction(AcceleratorAction action,
HandleSwitchIme(ime_control_delegate_.get(), accelerator);
break;
case SWITCH_TO_NEXT_USER:
- HandleCycleUser(SessionStateDelegate::CYCLE_TO_NEXT_USER);
+ HandleCycleUser(CycleUserDirection::NEXT);
break;
case SWITCH_TO_PREVIOUS_USER:
- HandleCycleUser(SessionStateDelegate::CYCLE_TO_PREVIOUS_USER);
+ HandleCycleUser(CycleUserDirection::PREVIOUS);
break;
case TOGGLE_APP_LIST:
HandleToggleAppList(accelerator);
« no previous file with comments | « no previous file | ash/common/session/session_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698