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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" 5 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <vector> 10 #include <vector>
(...skipping 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after
1258 DCHECK(user_manager::UserManager::Get()->IsUserLoggedIn()); 1258 DCHECK(user_manager::UserManager::Get()->IsUserLoggedIn());
1259 if (ScreenLocker::default_screen_locker()) 1259 if (ScreenLocker::default_screen_locker())
1260 ScreenLocker::default_screen_locker()->UnlockOnLoginSuccess(); 1260 ScreenLocker::default_screen_locker()->UnlockOnLoginSuccess();
1261 } 1261 }
1262 1262
1263 void SigninScreenHandler::HandleShowLoadingTimeoutError() { 1263 void SigninScreenHandler::HandleShowLoadingTimeoutError() {
1264 UpdateState(NetworkError::ERROR_REASON_LOADING_TIMEOUT); 1264 UpdateState(NetworkError::ERROR_REASON_LOADING_TIMEOUT);
1265 } 1265 }
1266 1266
1267 void SigninScreenHandler::HandleFocusPod(const AccountId& account_id) { 1267 void SigninScreenHandler::HandleFocusPod(const AccountId& account_id) {
1268 SetUserInputMethod(account_id.GetUserEmail(), ime_state_.get());
1269 WallpaperManager::Get()->SetUserWallpaperDelayed(account_id);
1270 proximity_auth::ScreenlockBridge::Get()->SetFocusedUser(account_id); 1268 proximity_auth::ScreenlockBridge::Get()->SetFocusedUser(account_id);
1271 if (delegate_) 1269 if (delegate_)
1272 delegate_->CheckUserStatus(account_id); 1270 delegate_->CheckUserStatus(account_id);
1273 if (!test_focus_pod_callback_.is_null()) 1271 if (!test_focus_pod_callback_.is_null())
1274 test_focus_pod_callback_.Run(); 1272 test_focus_pod_callback_.Run();
1275 1273
1276 bool use_24hour_clock = false; 1274 const user_manager::User* user =
1277 if (user_manager::known_user::GetBooleanPref( 1275 user_manager::UserManager::Get()->FindUser(account_id);
1278 account_id, prefs::kUse24HourClock, &use_24hour_clock)) { 1276 // 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.
1279 g_browser_process->platform_part() 1277 if (user && user->is_logged_in()) {
1280 ->GetSystemClock() 1278 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.
1281 ->SetLastFocusedPodHourClockType(use_24hour_clock ? base::k24HourClock 1279 account_id);
1282 : base::k12HourClock); 1280 } else {
1281 SetUserInputMethod(account_id.GetUserEmail(), ime_state_.get());
1282 WallpaperManager::Get()->SetUserWallpaperDelayed(account_id);
1283
1284 bool use_24hour_clock = false;
1285 if (user_manager::known_user::GetBooleanPref(
1286 account_id, prefs::kUse24HourClock, &use_24hour_clock)) {
1287 g_browser_process->platform_part()
1288 ->GetSystemClock()
1289 ->SetLastFocusedPodHourClockType(
1290 use_24hour_clock ? base::k24HourClock : base::k12HourClock);
1291 }
1283 } 1292 }
1284 } 1293 }
1285 1294
1286 void SigninScreenHandler::HandleGetPublicSessionKeyboardLayouts( 1295 void SigninScreenHandler::HandleGetPublicSessionKeyboardLayouts(
1287 const AccountId& account_id, 1296 const AccountId& account_id,
1288 const std::string& locale) { 1297 const std::string& locale) {
1289 GetKeyboardLayoutsForLocale( 1298 GetKeyboardLayoutsForLocale(
1290 base::Bind(&SigninScreenHandler::SendPublicSessionKeyboardLayouts, 1299 base::Bind(&SigninScreenHandler::SendPublicSessionKeyboardLayouts,
1291 weak_factory_.GetWeakPtr(), account_id, locale), 1300 weak_factory_.GetWeakPtr(), account_id, locale),
1292 locale); 1301 locale);
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
1435 } 1444 }
1436 1445
1437 void SigninScreenHandler::OnFeedbackFinished() { 1446 void SigninScreenHandler::OnFeedbackFinished() {
1438 CallJS("login.UnrecoverableCryptohomeErrorScreen.resumeAfterFeedbackUI"); 1447 CallJS("login.UnrecoverableCryptohomeErrorScreen.resumeAfterFeedbackUI");
1439 1448
1440 // Recreate user's cryptohome after the feedkback is attempted. 1449 // Recreate user's cryptohome after the feedkback is attempted.
1441 HandleResyncUserData(); 1450 HandleResyncUserData();
1442 } 1451 }
1443 1452
1444 } // namespace chromeos 1453 } // namespace chromeos
OLDNEW
« 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