Chromium Code Reviews| Index: chrome/browser/chromeos/login/existing_user_controller.cc |
| diff --git a/chrome/browser/chromeos/login/existing_user_controller.cc b/chrome/browser/chromeos/login/existing_user_controller.cc |
| index 4847d9a76509e89444c00580d41bceafd12776c0..b85c771644435e1ebaf7363776ff70e6a8fa1d30 100644 |
| --- a/chrome/browser/chromeos/login/existing_user_controller.cc |
| +++ b/chrome/browser/chromeos/login/existing_user_controller.cc |
| @@ -1238,6 +1238,16 @@ void ExistingUserController::PerformLoginFinishedActions( |
| StartAutoLoginTimer(); |
| } |
| +void ExistingUserController::ContinueLoginWhenCryptohomeAvailable( |
| + const base::Closure& continuation, |
| + bool service_is_available) { |
| + if (!service_is_available) { |
| + login_display_->SetUIEnabled(true); |
|
xiyuan
2017/04/13 18:07:31
How about do
LOG(ERROR) << "Cryptohome service
Sergey Poromov
2017/04/18 12:50:56
Done.
|
| + return; |
| + } |
| + continuation.Run(); |
| +} |
| + |
| void ExistingUserController::ContinueLoginIfDeviceNotDisabled( |
| const base::Closure& continuation) { |
| // Disable clicking on other windows and status tray. |
| @@ -1283,7 +1293,11 @@ void ExistingUserController::ContinueLoginIfDeviceNotDisabled( |
| return; |
| } |
| - continuation.Run(); |
| + chromeos::DBusThreadManager::Get() |
| + ->GetCryptohomeClient() |
| + ->WaitForServiceToBeAvailable(base::Bind( |
| + &ExistingUserController::ContinueLoginWhenCryptohomeAvailable, |
| + weak_factory_.GetWeakPtr(), continuation)); |
| } |
| void ExistingUserController::DoCompleteLogin( |