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 f8277d54fe1d98378e0ca9cfe886ede4075256f7..55bb111499b534f8a63c8de8bd6fd3af76bb8087 100644 |
--- a/chrome/browser/chromeos/login/wizard_controller.cc |
+++ b/chrome/browser/chromeos/login/wizard_controller.cc |
@@ -26,7 +26,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" |
@@ -125,6 +125,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"; |
@@ -327,6 +329,17 @@ 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())); |
+ } |
+ return auto_enrollment_check_screen_.get(); |
+} |
+ |
chromeos::LocallyManagedUserCreationScreen* |
WizardController::GetLocallyManagedUserCreationScreen() { |
if (!locally_managed_user_creation_screen_.get()) { |
@@ -482,6 +495,14 @@ void WizardController::ShowWrongHWIDScreen() { |
SetCurrentScreen(GetWrongHWIDScreen()); |
} |
+void WizardController::ShowAutoEnrollmentCheckScreen() { |
+ VLOG(1) << "Showing Auto-enrollment check screen."; |
+ SetStatusAreaVisible(true); |
+ AutoEnrollmentCheckScreen* screen = GetAutoEnrollmentCheckScreen(); |
+ screen->set_auto_enrollment_controller(host_->GetAutoEnrollmentController()); |
+ SetCurrentScreen(screen); |
+} |
+ |
void WizardController::ShowLocallyManagedUserCreationScreen() { |
VLOG(1) << "Showing Locally managed user creation screen screen."; |
SetStatusAreaVisible(true); |
@@ -559,7 +580,7 @@ void WizardController::OnConnectionFailed() { |
} |
void WizardController::OnUpdateCompleted() { |
- StartAutoEnrollmentCheck(); |
+ ShowAutoEnrollmentCheckScreen(); |
} |
void WizardController::OnEulaAccepted() { |
@@ -679,7 +700,6 @@ void WizardController::OnAutoEnrollmentDone() { |
} |
void WizardController::OnOOBECompleted() { |
- auto_enrollment_check_step_.reset(); |
if (ShouldAutoStartEnrollment()) { |
ShowEnrollmentScreen(); |
} else { |
@@ -817,6 +837,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) { |
@@ -1013,12 +1035,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_; |