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 56f4a8a5bac93ff35a1c6cb14a52d67380613452..d0cd9452531c74eeee6101df19ce36d11ae5d10e 100644 |
--- a/chrome/browser/chromeos/login/wizard_controller.cc |
+++ b/chrome/browser/chromeos/login/wizard_controller.cc |
@@ -286,7 +286,13 @@ void WizardController::Init(const std::string& first_screen_name) { |
} |
ErrorScreen* WizardController::GetErrorScreen() { |
- return static_cast<ErrorScreen*>(GetScreen(kErrorScreenName)); |
+ return oobe_display_->GetErrorScreen(); |
+} |
+ |
+BaseScreen* WizardController::GetScreen(const std::string& screen_name) { |
+ if (screen_name == kErrorScreenName) |
+ return GetErrorScreen(); |
+ return ScreenManager::GetScreen(screen_name); |
} |
BaseScreen* WizardController::CreateScreen(const std::string& screen_name) { |
@@ -295,13 +301,6 @@ BaseScreen* WizardController::CreateScreen(const std::string& screen_name) { |
new NetworkScreen(this, this, oobe_display_->GetNetworkView())); |
screen->Initialize(nullptr /* context */); |
return screen.release(); |
- } else if (screen_name == kErrorScreenName) { |
- scoped_ptr<ErrorScreen> screen = |
- static_cast<OobeUI*>(oobe_display_)->GetErrorScreen(); |
- if (!screen) |
- screen.reset(new ErrorScreen(this, oobe_display_->GetNetworkErrorView())); |
- screen->Initialize(nullptr /* context */); |
- return screen.release(); |
} else if (screen_name == kUpdateScreenName) { |
scoped_ptr<UpdateScreen> screen(new UpdateScreen( |
this, oobe_display_->GetUpdateView(), remora_controller_.get())); |