| 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 12 matching lines...) Expand all Loading... |
| 23 #include "chrome/browser/chrome_notification_types.h" | 23 #include "chrome/browser/chrome_notification_types.h" |
| 24 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h" | 24 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h" |
| 25 #include "chrome/browser/chromeos/boot_times_recorder.h" | 25 #include "chrome/browser/chromeos/boot_times_recorder.h" |
| 26 #include "chrome/browser/chromeos/customization/customization_document.h" | 26 #include "chrome/browser/chromeos/customization/customization_document.h" |
| 27 #include "chrome/browser/chromeos/login/arc_kiosk_controller.h" | 27 #include "chrome/browser/chromeos/login/arc_kiosk_controller.h" |
| 28 #include "chrome/browser/chromeos/login/auth/chrome_login_performer.h" | 28 #include "chrome/browser/chromeos/login/auth/chrome_login_performer.h" |
| 29 #include "chrome/browser/chromeos/login/easy_unlock/bootstrap_user_context_initi
alizer.h" | 29 #include "chrome/browser/chromeos/login/easy_unlock/bootstrap_user_context_initi
alizer.h" |
| 30 #include "chrome/browser/chromeos/login/easy_unlock/bootstrap_user_flow.h" | 30 #include "chrome/browser/chromeos/login/easy_unlock/bootstrap_user_flow.h" |
| 31 #include "chrome/browser/chromeos/login/enterprise_user_session_metrics.h" | 31 #include "chrome/browser/chromeos/login/enterprise_user_session_metrics.h" |
| 32 #include "chrome/browser/chromeos/login/helper.h" | 32 #include "chrome/browser/chromeos/login/helper.h" |
| 33 #include "chrome/browser/chromeos/login/screens/encryption_migration_screen.h" |
| 33 #include "chrome/browser/chromeos/login/session/user_session_manager.h" | 34 #include "chrome/browser/chromeos/login/session/user_session_manager.h" |
| 34 #include "chrome/browser/chromeos/login/signin/oauth2_token_initializer.h" | 35 #include "chrome/browser/chromeos/login/signin/oauth2_token_initializer.h" |
| 35 #include "chrome/browser/chromeos/login/signin_specifics.h" | 36 #include "chrome/browser/chromeos/login/signin_specifics.h" |
| 36 #include "chrome/browser/chromeos/login/startup_utils.h" | 37 #include "chrome/browser/chromeos/login/startup_utils.h" |
| 37 #include "chrome/browser/chromeos/login/ui/login_display_host.h" | 38 #include "chrome/browser/chromeos/login/ui/login_display_host.h" |
| 38 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h" | 39 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h" |
| 39 #include "chrome/browser/chromeos/login/user_flow.h" | 40 #include "chrome/browser/chromeos/login/user_flow.h" |
| 40 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" | 41 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" |
| 41 #include "chrome/browser/chromeos/login/wizard_controller.h" | 42 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 42 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 43 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| (...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 590 } | 591 } |
| 591 | 592 |
| 592 void ExistingUserController::ShowKioskEnableScreen() { | 593 void ExistingUserController::ShowKioskEnableScreen() { |
| 593 host_->StartWizard(OobeScreen::SCREEN_KIOSK_ENABLE); | 594 host_->StartWizard(OobeScreen::SCREEN_KIOSK_ENABLE); |
| 594 } | 595 } |
| 595 | 596 |
| 596 void ExistingUserController::ShowKioskAutolaunchScreen() { | 597 void ExistingUserController::ShowKioskAutolaunchScreen() { |
| 597 host_->StartWizard(OobeScreen::SCREEN_KIOSK_AUTOLAUNCH); | 598 host_->StartWizard(OobeScreen::SCREEN_KIOSK_AUTOLAUNCH); |
| 598 } | 599 } |
| 599 | 600 |
| 600 void ExistingUserController::ShowEncryptionMigrationScreen() { | 601 void ExistingUserController::ShowEncryptionMigrationScreen( |
| 602 const UserContext& user_context) { |
| 601 host_->StartWizard(OobeScreen::SCREEN_ENCRYPTION_MIGRATION); | 603 host_->StartWizard(OobeScreen::SCREEN_ENCRYPTION_MIGRATION); |
| 604 |
| 605 EncryptionMigrationScreen* migration_screen = |
| 606 static_cast<EncryptionMigrationScreen*>( |
| 607 host_->GetWizardController()->current_screen()); |
| 608 DCHECK(migration_screen); |
| 609 migration_screen->SetUserContext(user_context); |
| 602 } | 610 } |
| 603 | 611 |
| 604 void ExistingUserController::ShowTPMError() { | 612 void ExistingUserController::ShowTPMError() { |
| 605 login_display_->SetUIEnabled(false); | 613 login_display_->SetUIEnabled(false); |
| 606 login_display_->ShowErrorScreen(LoginDisplay::TPM_ERROR); | 614 login_display_->ShowErrorScreen(LoginDisplay::TPM_ERROR); |
| 607 } | 615 } |
| 608 | 616 |
| 609 void ExistingUserController::ShowPasswordChangedDialog() { | 617 void ExistingUserController::ShowPasswordChangedDialog() { |
| 610 RecordPasswordChangeFlow(LOGIN_PASSWORD_CHANGE_FLOW_PASSWORD_CHANGED); | 618 RecordPasswordChangeFlow(LOGIN_PASSWORD_CHANGE_FLOW_PASSWORD_CHANGED); |
| 611 | 619 |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 822 last_login_attempt_account_id_, | 830 last_login_attempt_account_id_, |
| 823 base::Bind(&ExistingUserController::OnTokenHandleChecked, | 831 base::Bind(&ExistingUserController::OnTokenHandleChecked, |
| 824 weak_factory_.GetWeakPtr())); | 832 weak_factory_.GetWeakPtr())); |
| 825 return; | 833 return; |
| 826 } | 834 } |
| 827 } | 835 } |
| 828 | 836 |
| 829 ShowPasswordChangedDialog(); | 837 ShowPasswordChangedDialog(); |
| 830 } | 838 } |
| 831 | 839 |
| 832 void ExistingUserController::OnOldEncryptionDetected() { | 840 void ExistingUserController::OnOldEncryptionDetected( |
| 833 ShowEncryptionMigrationScreen(); | 841 const UserContext& user_context) { |
| 842 ShowEncryptionMigrationScreen(user_context); |
| 834 } | 843 } |
| 835 | 844 |
| 836 void ExistingUserController::WhiteListCheckFailed(const std::string& email) { | 845 void ExistingUserController::WhiteListCheckFailed(const std::string& email) { |
| 837 PerformLoginFinishedActions(true /* start auto login timer */); | 846 PerformLoginFinishedActions(true /* start auto login timer */); |
| 838 | 847 |
| 839 login_display_->ShowWhitelistCheckFailedError(); | 848 login_display_->ShowWhitelistCheckFailedError(); |
| 840 | 849 |
| 841 if (auth_status_consumer_) { | 850 if (auth_status_consumer_) { |
| 842 auth_status_consumer_->OnAuthFailure( | 851 auth_status_consumer_->OnAuthFailure( |
| 843 AuthFailure(AuthFailure::WHITELIST_CHECK_FAILED)); | 852 AuthFailure(AuthFailure::WHITELIST_CHECK_FAILED)); |
| (...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1392 login_display_->ShowUnrecoverableCrypthomeErrorDialog(); | 1401 login_display_->ShowUnrecoverableCrypthomeErrorDialog(); |
| 1393 } | 1402 } |
| 1394 | 1403 |
| 1395 void ExistingUserController::ClearRecordedNames() { | 1404 void ExistingUserController::ClearRecordedNames() { |
| 1396 display_email_.clear(); | 1405 display_email_.clear(); |
| 1397 display_name_.clear(); | 1406 display_name_.clear(); |
| 1398 given_name_.clear(); | 1407 given_name_.clear(); |
| 1399 } | 1408 } |
| 1400 | 1409 |
| 1401 } // namespace chromeos | 1410 } // namespace chromeos |
| OLD | NEW |