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

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

Issue 1494153002: This CL replaces e-mail with AccountId in easy signin code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update after review. Created 5 years 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
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 <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 keyboard->RemoveObserver(this); 289 keyboard->RemoveObserver(this);
290 weak_factory_.InvalidateWeakPtrs(); 290 weak_factory_.InvalidateWeakPtrs();
291 if (delegate_) 291 if (delegate_)
292 delegate_->SetWebUIHandler(nullptr); 292 delegate_->SetWebUIHandler(nullptr);
293 network_state_informer_->RemoveObserver(this); 293 network_state_informer_->RemoveObserver(this);
294 if (max_mode_delegate_) { 294 if (max_mode_delegate_) {
295 max_mode_delegate_->RemoveObserver(this); 295 max_mode_delegate_->RemoveObserver(this);
296 max_mode_delegate_.reset(nullptr); 296 max_mode_delegate_.reset(nullptr);
297 } 297 }
298 proximity_auth::ScreenlockBridge::Get()->SetLockHandler(nullptr); 298 proximity_auth::ScreenlockBridge::Get()->SetLockHandler(nullptr);
299 proximity_auth::ScreenlockBridge::Get()->SetFocusedUser(""); 299 proximity_auth::ScreenlockBridge::Get()->SetFocusedUser(EmptyAccountId());
300 } 300 }
301 301
302 // static 302 // static
303 std::string SigninScreenHandler::GetUserLRUInputMethod( 303 std::string SigninScreenHandler::GetUserLRUInputMethod(
304 const std::string& username) { 304 const std::string& username) {
305 PrefService* const local_state = g_browser_process->local_state(); 305 PrefService* const local_state = g_browser_process->local_state();
306 const base::DictionaryValue* users_lru_input_methods = 306 const base::DictionaryValue* users_lru_input_methods =
307 local_state->GetDictionary(prefs::kUsersLRUInputMethod); 307 local_state->GetDictionary(prefs::kUsersLRUInputMethod);
308 308
309 if (!users_lru_input_methods) { 309 if (!users_lru_input_methods) {
(...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after
1234 ScreenLocker::default_screen_locker()->UnlockOnLoginSuccess(); 1234 ScreenLocker::default_screen_locker()->UnlockOnLoginSuccess();
1235 } 1235 }
1236 1236
1237 void SigninScreenHandler::HandleShowLoadingTimeoutError() { 1237 void SigninScreenHandler::HandleShowLoadingTimeoutError() {
1238 UpdateState(NetworkError::ERROR_REASON_LOADING_TIMEOUT); 1238 UpdateState(NetworkError::ERROR_REASON_LOADING_TIMEOUT);
1239 } 1239 }
1240 1240
1241 void SigninScreenHandler::HandleFocusPod(const AccountId& account_id) { 1241 void SigninScreenHandler::HandleFocusPod(const AccountId& account_id) {
1242 SetUserInputMethod(account_id.GetUserEmail(), ime_state_.get()); 1242 SetUserInputMethod(account_id.GetUserEmail(), ime_state_.get());
1243 WallpaperManager::Get()->SetUserWallpaperDelayed(account_id.GetUserEmail()); 1243 WallpaperManager::Get()->SetUserWallpaperDelayed(account_id.GetUserEmail());
1244 proximity_auth::ScreenlockBridge::Get()->SetFocusedUser( 1244 proximity_auth::ScreenlockBridge::Get()->SetFocusedUser(account_id);
1245 account_id.GetUserEmail());
1246 if (delegate_) 1245 if (delegate_)
1247 delegate_->CheckUserStatus(account_id); 1246 delegate_->CheckUserStatus(account_id);
1248 if (!test_focus_pod_callback_.is_null()) 1247 if (!test_focus_pod_callback_.is_null())
1249 test_focus_pod_callback_.Run(); 1248 test_focus_pod_callback_.Run();
1250 1249
1251 bool use_24hour_clock = false; 1250 bool use_24hour_clock = false;
1252 if (user_manager::UserManager::Get()->GetKnownUserBooleanPref( 1251 if (user_manager::UserManager::Get()->GetKnownUserBooleanPref(
1253 account_id, prefs::kUse24HourClock, &use_24hour_clock)) { 1252 account_id, prefs::kUse24HourClock, &use_24hour_clock)) {
1254 g_browser_process->platform_part() 1253 g_browser_process->platform_part()
1255 ->GetSystemClock() 1254 ->GetSystemClock()
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1411 return gaia_screen_handler_->frame_error(); 1410 return gaia_screen_handler_->frame_error();
1412 } 1411 }
1413 1412
1414 void SigninScreenHandler::OnCapsLockChanged(bool enabled) { 1413 void SigninScreenHandler::OnCapsLockChanged(bool enabled) {
1415 caps_lock_enabled_ = enabled; 1414 caps_lock_enabled_ = enabled;
1416 if (page_is_ready()) 1415 if (page_is_ready())
1417 CallJS("login.AccountPickerScreen.setCapsLockState", caps_lock_enabled_); 1416 CallJS("login.AccountPickerScreen.setCapsLockState", caps_lock_enabled_);
1418 } 1417 }
1419 1418
1420 } // namespace chromeos 1419 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698