| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chromeos/login/existing_user_controller.h" | 5 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 | 610 |
| 611 void ExistingUserController::ShowKioskEnableScreen() { | 611 void ExistingUserController::ShowKioskEnableScreen() { |
| 612 host_->StartWizard(OobeScreen::SCREEN_KIOSK_ENABLE); | 612 host_->StartWizard(OobeScreen::SCREEN_KIOSK_ENABLE); |
| 613 } | 613 } |
| 614 | 614 |
| 615 void ExistingUserController::ShowKioskAutolaunchScreen() { | 615 void ExistingUserController::ShowKioskAutolaunchScreen() { |
| 616 host_->StartWizard(OobeScreen::SCREEN_KIOSK_AUTOLAUNCH); | 616 host_->StartWizard(OobeScreen::SCREEN_KIOSK_AUTOLAUNCH); |
| 617 } | 617 } |
| 618 | 618 |
| 619 void ExistingUserController::ShowEncryptionMigrationScreen( | 619 void ExistingUserController::ShowEncryptionMigrationScreen( |
| 620 const UserContext& user_context) { | 620 const UserContext& user_context, |
| 621 bool has_incomplete_migration) { |
| 621 host_->StartWizard(OobeScreen::SCREEN_ENCRYPTION_MIGRATION); | 622 host_->StartWizard(OobeScreen::SCREEN_ENCRYPTION_MIGRATION); |
| 622 | 623 |
| 623 EncryptionMigrationScreen* migration_screen = | 624 EncryptionMigrationScreen* migration_screen = |
| 624 static_cast<EncryptionMigrationScreen*>( | 625 static_cast<EncryptionMigrationScreen*>( |
| 625 host_->GetWizardController()->current_screen()); | 626 host_->GetWizardController()->current_screen()); |
| 626 DCHECK(migration_screen); | 627 DCHECK(migration_screen); |
| 627 migration_screen->SetUserContext(user_context); | 628 migration_screen->SetUserContext(user_context); |
| 629 migration_screen->SetShouldResume(has_incomplete_migration); |
| 628 migration_screen->SetContinueLoginCallback(base::BindOnce( | 630 migration_screen->SetContinueLoginCallback(base::BindOnce( |
| 629 &ExistingUserController::ContinuePerformLogin, weak_factory_.GetWeakPtr(), | 631 &ExistingUserController::ContinuePerformLogin, weak_factory_.GetWeakPtr(), |
| 630 login_performer_->auth_mode())); | 632 login_performer_->auth_mode())); |
| 631 } | 633 } |
| 632 | 634 |
| 633 void ExistingUserController::ShowTPMError() { | 635 void ExistingUserController::ShowTPMError() { |
| 634 login_display_->SetUIEnabled(false); | 636 login_display_->SetUIEnabled(false); |
| 635 login_display_->ShowErrorScreen(LoginDisplay::TPM_ERROR); | 637 login_display_->ShowErrorScreen(LoginDisplay::TPM_ERROR); |
| 636 } | 638 } |
| 637 | 639 |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 861 base::Bind(&ExistingUserController::OnTokenHandleChecked, | 863 base::Bind(&ExistingUserController::OnTokenHandleChecked, |
| 862 weak_factory_.GetWeakPtr())); | 864 weak_factory_.GetWeakPtr())); |
| 863 return; | 865 return; |
| 864 } | 866 } |
| 865 } | 867 } |
| 866 | 868 |
| 867 ShowPasswordChangedDialog(); | 869 ShowPasswordChangedDialog(); |
| 868 } | 870 } |
| 869 | 871 |
| 870 void ExistingUserController::OnOldEncryptionDetected( | 872 void ExistingUserController::OnOldEncryptionDetected( |
| 871 const UserContext& user_context) { | 873 const UserContext& user_context, |
| 872 ShowEncryptionMigrationScreen(user_context); | 874 bool has_incomplete_migration) { |
| 875 ShowEncryptionMigrationScreen(user_context, has_incomplete_migration); |
| 873 } | 876 } |
| 874 | 877 |
| 875 void ExistingUserController::WhiteListCheckFailed(const std::string& email) { | 878 void ExistingUserController::WhiteListCheckFailed(const std::string& email) { |
| 876 PerformLoginFinishedActions(true /* start auto login timer */); | 879 PerformLoginFinishedActions(true /* start auto login timer */); |
| 877 | 880 |
| 878 login_display_->ShowWhitelistCheckFailedError(); | 881 login_display_->ShowWhitelistCheckFailedError(); |
| 879 | 882 |
| 880 if (auth_status_consumer_) { | 883 if (auth_status_consumer_) { |
| 881 auth_status_consumer_->OnAuthFailure( | 884 auth_status_consumer_->OnAuthFailure( |
| 882 AuthFailure(AuthFailure::WHITELIST_CHECK_FAILED)); | 885 AuthFailure(AuthFailure::WHITELIST_CHECK_FAILED)); |
| (...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1431 login_display_->ShowUnrecoverableCrypthomeErrorDialog(); | 1434 login_display_->ShowUnrecoverableCrypthomeErrorDialog(); |
| 1432 } | 1435 } |
| 1433 | 1436 |
| 1434 void ExistingUserController::ClearRecordedNames() { | 1437 void ExistingUserController::ClearRecordedNames() { |
| 1435 display_email_.clear(); | 1438 display_email_.clear(); |
| 1436 display_name_.clear(); | 1439 display_name_.clear(); |
| 1437 given_name_.clear(); | 1440 given_name_.clear(); |
| 1438 } | 1441 } |
| 1439 | 1442 |
| 1440 } // namespace chromeos | 1443 } // namespace chromeos |
| OLD | NEW |