| Index: chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
|
| diff --git a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
|
| index b5aea33301a2e2f0cdb57e01c4af0f00ed6970e5..d7871e4eb5bda2f90470336504be3910d274bdf3 100644
|
| --- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
|
| +++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
|
| @@ -1265,21 +1265,30 @@ void SigninScreenHandler::HandleShowLoadingTimeoutError() {
|
| }
|
|
|
| void SigninScreenHandler::HandleFocusPod(const AccountId& account_id) {
|
| - SetUserInputMethod(account_id.GetUserEmail(), ime_state_.get());
|
| - WallpaperManager::Get()->SetUserWallpaperDelayed(account_id);
|
| proximity_auth::ScreenlockBridge::Get()->SetFocusedUser(account_id);
|
| if (delegate_)
|
| delegate_->CheckUserStatus(account_id);
|
| if (!test_focus_pod_callback_.is_null())
|
| test_focus_pod_callback_.Run();
|
|
|
| - bool use_24hour_clock = false;
|
| - if (user_manager::known_user::GetBooleanPref(
|
| - account_id, prefs::kUse24HourClock, &use_24hour_clock)) {
|
| - g_browser_process->platform_part()
|
| - ->GetSystemClock()
|
| - ->SetLastFocusedPodHourClockType(use_24hour_clock ? base::k24HourClock
|
| - : base::k12HourClock);
|
| + const user_manager::User* user =
|
| + user_manager::UserManager::Get()->FindUser(account_id);
|
| + // |user| may be nullptr in kiosk mode or unit tests.
|
| + if (user && user->is_logged_in() && !user->is_active()) {
|
| + ash::Shell::GetInstance()->session_state_delegate()->SwitchActiveUser(
|
| + account_id);
|
| + } else {
|
| + SetUserInputMethod(account_id.GetUserEmail(), ime_state_.get());
|
| + WallpaperManager::Get()->SetUserWallpaperDelayed(account_id);
|
| +
|
| + bool use_24hour_clock = false;
|
| + if (user_manager::known_user::GetBooleanPref(
|
| + account_id, prefs::kUse24HourClock, &use_24hour_clock)) {
|
| + g_browser_process->platform_part()
|
| + ->GetSystemClock()
|
| + ->SetLastFocusedPodHourClockType(
|
| + use_24hour_clock ? base::k24HourClock : base::k12HourClock);
|
| + }
|
| }
|
| }
|
|
|
|
|