Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 893 // Forces a reload for Gaia screen on hiding error message. | 893 // Forces a reload for Gaia screen on hiding error message. |
| 894 if (IsGaiaVisible() || IsGaiaHiddenByError()) | 894 if (IsGaiaVisible() || IsGaiaHiddenByError()) |
| 895 ReloadGaia(reason == NetworkError::ERROR_REASON_NETWORK_STATE_CHANGED); | 895 ReloadGaia(reason == NetworkError::ERROR_REASON_NETWORK_STATE_CHANGED); |
| 896 } | 896 } |
| 897 | 897 |
| 898 void SigninScreenHandler::ReloadGaia(bool force_reload) { | 898 void SigninScreenHandler::ReloadGaia(bool force_reload) { |
| 899 gaia_screen_handler_->ReloadGaia(force_reload); | 899 gaia_screen_handler_->ReloadGaia(force_reload); |
| 900 } | 900 } |
| 901 | 901 |
| 902 void SigninScreenHandler::Initialize() { | 902 void SigninScreenHandler::Initialize() { |
| 903 // delegate_ is null when we are preloading the lock screen. There may be no | |
|
xiyuan
2016/12/09 22:47:21
nit: delegate_ -> |delegate_|
jdufault
2016/12/12 19:52:02
Done.
| |
| 904 // primary user in a test. | |
| 905 if (user_manager::UserManager::IsInitialized() && | |
| 906 user_manager::UserManager::Get()->GetPrimaryUser()) { | |
| 907 chromeos::PinStorage* pin_storage = | |
|
Alexander Alekseev
2016/12/10 01:26:49
I assume that you are only looaking at active user
jdufault
2016/12/12 19:52:02
I've changed this to iterate over every user.
| |
| 908 chromeos::PinStorageFactory::GetForUser( | |
| 909 user_manager::UserManager::Get()->GetActiveUser()); | |
| 910 if (pin_storage && pin_storage->IsPinAuthenticationAvailable()) | |
| 911 CallJS("cr.ui.Oobe.preloadPin"); | |
| 912 } | |
| 913 | |
| 903 if (delegate_ && show_on_init_) { | 914 if (delegate_ && show_on_init_) { |
| 904 show_on_init_ = false; | 915 show_on_init_ = false; |
| 905 ShowImpl(); | 916 ShowImpl(); |
| 906 } | 917 } |
| 907 } | 918 } |
| 908 | 919 |
| 909 gfx::NativeWindow SigninScreenHandler::GetNativeWindow() { | 920 gfx::NativeWindow SigninScreenHandler::GetNativeWindow() { |
| 910 if (native_window_delegate_) | 921 if (native_window_delegate_) |
| 911 return native_window_delegate_->GetNativeWindow(); | 922 return native_window_delegate_->GetNativeWindow(); |
| 912 return nullptr; | 923 return nullptr; |
| (...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1533 } | 1544 } |
| 1534 | 1545 |
| 1535 void SigninScreenHandler::OnFeedbackFinished() { | 1546 void SigninScreenHandler::OnFeedbackFinished() { |
| 1536 CallJS("login.UnrecoverableCryptohomeErrorScreen.resumeAfterFeedbackUI"); | 1547 CallJS("login.UnrecoverableCryptohomeErrorScreen.resumeAfterFeedbackUI"); |
| 1537 | 1548 |
| 1538 // Recreate user's cryptohome after the feedback is attempted. | 1549 // Recreate user's cryptohome after the feedback is attempted. |
| 1539 HandleResyncUserData(); | 1550 HandleResyncUserData(); |
| 1540 } | 1551 } |
| 1541 | 1552 |
| 1542 } // namespace chromeos | 1553 } // namespace chromeos |
| OLD | NEW |