Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2629)

Unified Diff: chrome/browser/chromeos/login/wizard_controller.cc

Issue 1107363002: Merge M43: Fix crash on Enrollment screen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2357
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/login/wizard_controller.h ('k') | chrome/browser/ui/webui/chromeos/login/oobe_ui.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()));
« no previous file with comments | « chrome/browser/chromeos/login/wizard_controller.h ('k') | chrome/browser/ui/webui/chromeos/login/oobe_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698