Chromium Code Reviews| Index: chrome/browser/chromeos/login/wizard_controller.cc |
| diff --git a/chrome/browser/chromeos/login/wizard_controller.cc b/chrome/browser/chromeos/login/wizard_controller.cc |
| index c8b86f371fad4c235657e8599579b0d9f8737c5e..3c263e96f8f569dad4eee08d97c28cad57622177 100644 |
| --- a/chrome/browser/chromeos/login/wizard_controller.cc |
| +++ b/chrome/browser/chromeos/login/wizard_controller.cc |
| @@ -25,7 +25,7 @@ |
| #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
| #include "chrome/browser/chromeos/customization_document.h" |
| #include "chrome/browser/chromeos/geolocation/simple_geolocation_provider.h" |
| -#include "chrome/browser/chromeos/login/enrollment/auto_enrollment_check_step.h" |
| +#include "chrome/browser/chromeos/login/enrollment/auto_enrollment_check_screen.h" |
| #include "chrome/browser/chromeos/login/enrollment/enrollment_screen.h" |
| #include "chrome/browser/chromeos/login/existing_user_controller.h" |
| #include "chrome/browser/chromeos/login/helper.h" |
| @@ -124,6 +124,8 @@ const char WizardController::kKioskEnableScreenName[] = "kiosk-enable"; |
| const char WizardController::kKioskAutolaunchScreenName[] = "autolaunch"; |
| const char WizardController::kErrorScreenName[] = "error-message"; |
| const char WizardController::kTermsOfServiceScreenName[] = "tos"; |
| +const char WizardController::kAutoEnrollmentCheckScreenName[] = |
| + "auto-enrollment-check"; |
| const char WizardController::kWrongHWIDScreenName[] = "wrong-hwid"; |
| const char WizardController::kLocallyManagedUserCreationScreenName[] = |
| "locally-managed-user-creation-flow"; |
| @@ -325,6 +327,18 @@ chromeos::WrongHWIDScreen* WizardController::GetWrongHWIDScreen() { |
| return wrong_hwid_screen_.get(); |
| } |
| +chromeos::AutoEnrollmentCheckScreen* |
| + WizardController::GetAutoEnrollmentCheckScreen() { |
| + if (!auto_enrollment_check_screen_.get()) { |
| + auto_enrollment_check_screen_.reset( |
| + new chromeos::AutoEnrollmentCheckScreen( |
| + this, |
| + oobe_display_->GetAutoEnrollmentCheckScreenActor(), |
| + host_->GetAutoEnrollmentController())); |
| + } |
| + return auto_enrollment_check_screen_.get(); |
| +} |
| + |
| chromeos::LocallyManagedUserCreationScreen* |
| WizardController::GetLocallyManagedUserCreationScreen() { |
| if (!locally_managed_user_creation_screen_.get()) { |
| @@ -480,6 +494,12 @@ void WizardController::ShowWrongHWIDScreen() { |
| SetCurrentScreen(GetWrongHWIDScreen()); |
| } |
| +void WizardController::ShowAutoEnrollmentCheckScreen() { |
| + VLOG(1) << "Showing Auto-enrollment check screen."; |
| + SetStatusAreaVisible(true); |
|
Mattias Nissler (ping if slow)
2014/05/19 19:25:51
Why? I think the status area is supposed to be hid
pastarmovj
2014/05/20 13:50:08
All other OOBE screens are like that - see ShowEul
|
| + SetCurrentScreen(GetAutoEnrollmentCheckScreen()); |
| +} |
| + |
| void WizardController::ShowLocallyManagedUserCreationScreen() { |
| VLOG(1) << "Showing Locally managed user creation screen screen."; |
| SetStatusAreaVisible(true); |
| @@ -557,7 +577,7 @@ void WizardController::OnConnectionFailed() { |
| } |
| void WizardController::OnUpdateCompleted() { |
| - StartAutoEnrollmentCheck(); |
| + ShowAutoEnrollmentCheckScreen(); |
| } |
| void WizardController::OnEulaAccepted() { |
| @@ -677,7 +697,6 @@ void WizardController::OnAutoEnrollmentDone() { |
| } |
| void WizardController::OnOOBECompleted() { |
| - auto_enrollment_check_step_.reset(); |
| if (ShouldAutoStartEnrollment()) { |
| ShowEnrollmentScreen(); |
| } else { |
| @@ -815,6 +834,8 @@ void WizardController::AdvanceToScreen(const std::string& screen_name) { |
| ShowTermsOfServiceScreen(); |
| } else if (screen_name == kWrongHWIDScreenName) { |
| ShowWrongHWIDScreen(); |
| + } else if (screen_name == kAutoEnrollmentCheckScreenName) { |
| + ShowAutoEnrollmentCheckScreen(); |
| } else if (screen_name == kLocallyManagedUserCreationScreenName) { |
| ShowLocallyManagedUserCreationScreen(); |
| } else if (screen_name == kAppLaunchSplashScreenName) { |
| @@ -1011,12 +1032,6 @@ void WizardController::OnLocalStateInitialized(bool /* succeeded */) { |
| ShowErrorScreen(); |
| } |
| -void WizardController::StartAutoEnrollmentCheck() { |
| - auto_enrollment_check_step_.reset( |
| - new AutoEnrollmentCheckStep(this, host_->GetAutoEnrollmentController())); |
| - auto_enrollment_check_step_->Start(); |
| -} |
| - |
| PrefService* WizardController::GetLocalState() { |
| if (local_state_for_testing_) |
| return local_state_for_testing_; |