| 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 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 VLOG(1) << "Create a new cryptohome and resync user data."; | 485 VLOG(1) << "Create a new cryptohome and resync user data."; |
| 486 login_performer_->ResyncEncryptedData(); | 486 login_performer_->ResyncEncryptedData(); |
| 487 } | 487 } |
| 488 } | 488 } |
| 489 | 489 |
| 490 void ExistingUserController::SetDisplayEmail(const std::string& email) { | 490 void ExistingUserController::SetDisplayEmail(const std::string& email) { |
| 491 display_email_ = email; | 491 display_email_ = email; |
| 492 } | 492 } |
| 493 | 493 |
| 494 void ExistingUserController::ShowWrongHWIDScreen() { | 494 void ExistingUserController::ShowWrongHWIDScreen() { |
| 495 host_->StartWizard(WizardController::kWrongHWIDScreenName); | 495 host_->StartWizard(OobeScreen::SCREEN_WRONG_HWID); |
| 496 } | 496 } |
| 497 | 497 |
| 498 void ExistingUserController::Signout() { | 498 void ExistingUserController::Signout() { |
| 499 NOTREACHED(); | 499 NOTREACHED(); |
| 500 } | 500 } |
| 501 | 501 |
| 502 bool ExistingUserController::IsUserWhitelisted(const AccountId& account_id) { | 502 bool ExistingUserController::IsUserWhitelisted(const AccountId& account_id) { |
| 503 bool wildcard_match = false; | 503 bool wildcard_match = false; |
| 504 if (login_performer_.get()) | 504 if (login_performer_.get()) |
| 505 return login_performer_->IsUserWhitelisted(account_id, &wildcard_match); | 505 return login_performer_->IsUserWhitelisted(account_id, &wildcard_match); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 530 ShowEnrollmentScreen(); | 530 ShowEnrollmentScreen(); |
| 531 } | 531 } |
| 532 } else { | 532 } else { |
| 533 // OwnershipService::GetStatusAsync is supposed to return either | 533 // OwnershipService::GetStatusAsync is supposed to return either |
| 534 // OWNERSHIP_NONE or OWNERSHIP_TAKEN. | 534 // OWNERSHIP_NONE or OWNERSHIP_TAKEN. |
| 535 NOTREACHED(); | 535 NOTREACHED(); |
| 536 } | 536 } |
| 537 } | 537 } |
| 538 | 538 |
| 539 void ExistingUserController::ShowEnrollmentScreen() { | 539 void ExistingUserController::ShowEnrollmentScreen() { |
| 540 host_->StartWizard(WizardController::kEnrollmentScreenName); | 540 host_->StartWizard(OobeScreen::SCREEN_OOBE_ENROLLMENT); |
| 541 } | 541 } |
| 542 | 542 |
| 543 void ExistingUserController::ShowResetScreen() { | 543 void ExistingUserController::ShowResetScreen() { |
| 544 host_->StartWizard(WizardController::kResetScreenName); | 544 host_->StartWizard(OobeScreen::SCREEN_OOBE_RESET); |
| 545 } | 545 } |
| 546 | 546 |
| 547 void ExistingUserController::ShowEnableDebuggingScreen() { | 547 void ExistingUserController::ShowEnableDebuggingScreen() { |
| 548 host_->StartWizard(WizardController::kEnableDebuggingScreenName); | 548 host_->StartWizard(OobeScreen::SCREEN_OOBE_ENABLE_DEBUGGING); |
| 549 } | 549 } |
| 550 | 550 |
| 551 void ExistingUserController::ShowKioskEnableScreen() { | 551 void ExistingUserController::ShowKioskEnableScreen() { |
| 552 host_->StartWizard(WizardController::kKioskEnableScreenName); | 552 host_->StartWizard(OobeScreen::SCREEN_KIOSK_ENABLE); |
| 553 } | 553 } |
| 554 | 554 |
| 555 void ExistingUserController::ShowKioskAutolaunchScreen() { | 555 void ExistingUserController::ShowKioskAutolaunchScreen() { |
| 556 host_->StartWizard(WizardController::kKioskAutolaunchScreenName); | 556 host_->StartWizard(OobeScreen::SCREEN_KIOSK_AUTOLAUNCH); |
| 557 } | 557 } |
| 558 | 558 |
| 559 void ExistingUserController::ShowTPMError() { | 559 void ExistingUserController::ShowTPMError() { |
| 560 login_display_->SetUIEnabled(false); | 560 login_display_->SetUIEnabled(false); |
| 561 login_display_->ShowErrorScreen(LoginDisplay::TPM_ERROR); | 561 login_display_->ShowErrorScreen(LoginDisplay::TPM_ERROR); |
| 562 } | 562 } |
| 563 | 563 |
| 564 void ExistingUserController::ShowPasswordChangedDialog() { | 564 void ExistingUserController::ShowPasswordChangedDialog() { |
| 565 RecordPasswordChangeFlow(LOGIN_PASSWORD_CHANGE_FLOW_PASSWORD_CHANGED); | 565 RecordPasswordChangeFlow(LOGIN_PASSWORD_CHANGE_FLOW_PASSWORD_CHANGED); |
| 566 | 566 |
| (...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1320 } | 1320 } |
| 1321 | 1321 |
| 1322 // Otherwise, show the unrecoverable cryptohome error UI and ask user's | 1322 // Otherwise, show the unrecoverable cryptohome error UI and ask user's |
| 1323 // permission to collect a feedback. | 1323 // permission to collect a feedback. |
| 1324 RecordPasswordChangeFlow(LOGIN_PASSWORD_CHANGE_FLOW_CRYPTOHOME_FAILURE); | 1324 RecordPasswordChangeFlow(LOGIN_PASSWORD_CHANGE_FLOW_CRYPTOHOME_FAILURE); |
| 1325 VLOG(1) << "Show unrecoverable cryptohome error dialog."; | 1325 VLOG(1) << "Show unrecoverable cryptohome error dialog."; |
| 1326 login_display_->ShowUnrecoverableCrypthomeErrorDialog(); | 1326 login_display_->ShowUnrecoverableCrypthomeErrorDialog(); |
| 1327 } | 1327 } |
| 1328 | 1328 |
| 1329 } // namespace chromeos | 1329 } // namespace chromeos |
| OLD | NEW |