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

Unified Diff: chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc

Issue 2035753003: Fixed inconsistency with tray icon and user pod on lock screen. Account now switches when focus cha… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: User pod fix 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..18db7d2eb090a13947d55b2a33b4fae2c0405f45 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 null in kiosk test
oshima 2016/06/03 23:09:40 nit: // |user| may be nullptr in kiosk mode or uni
hariank 2016/06/06 17:47:30 Done.
+ if (user && user->is_logged_in()) {
+ ash::Shell::GetInstance()->session_state_delegate()->SwitchActiveUser(
xiyuan 2016/06/03 23:05:57 nit: No need to switch if current user is already
hariank 2016/06/06 17:47:30 Done.
+ 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);
+ }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698