diff options
author | nkostylev@google.com <nkostylev@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-15 14:39:08 +0000 |
---|---|---|
committer | nkostylev@google.com <nkostylev@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-15 14:39:08 +0000 |
commit | 454979f1dc971929dce8196f5e2baf7d77c810e9 (patch) | |
tree | d5d187e1293cd910fb491885b2fb24e7a0c49579 | |
parent | 893894cccf7dc98e555a966d9436d734769e99e1 (diff) | |
download | chromium_src-454979f1dc971929dce8196f5e2baf7d77c810e9.zip chromium_src-454979f1dc971929dce8196f5e2baf7d77c810e9.tar.gz chromium_src-454979f1dc971929dce8196f5e2baf7d77c810e9.tar.bz2 |
Introduce full OOBE flow.
BUG=38192
TEST=Run chrome with --login-manager --login-screen=oobe should always trigger full OOBE flow (including network selection and update screens). Once user is signed in OOBE flow is not shown.
Review URL: http://codereview.chromium.org/964001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41583 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/chromeos/login/wizard_controller.cc | 18 | ||||
-rw-r--r-- | chrome/browser/chromeos/login/wizard_controller.h | 3 |
2 files changed, 18 insertions, 3 deletions
diff --git a/chrome/browser/chromeos/login/wizard_controller.cc b/chrome/browser/chromeos/login/wizard_controller.cc index c898962..c0e780b 100644 --- a/chrome/browser/chromeos/login/wizard_controller.cc +++ b/chrome/browser/chromeos/login/wizard_controller.cc @@ -38,6 +38,9 @@ const char kLoginScreenName[] = "login"; const char kAccountScreenName[] = "account"; const char kUpdateScreenName[] = "update"; +// Passing this parameter as a "first screen" initiates full OOBE flow. +const char kOutOfBoxScreenName[] = "oobe"; + // RootView of the Widget WizardController creates. Contains the contents of the // WizardController. class ContentView : public views::View { @@ -96,7 +99,8 @@ WizardController::WizardController() background_widget_(NULL), background_view_(NULL), contents_(NULL), - current_screen_(NULL) { + current_screen_(NULL), + is_out_of_box_(false) { DCHECK(default_controller_ == NULL); default_controller_ = this; } @@ -138,6 +142,11 @@ void WizardController::Init(const std::string& first_screen_name, NULL); window->SetContentsView(contents_); + if (chromeos::UserManager::Get()->GetUsers().empty() || + first_screen_name == kOutOfBoxScreenName) { + is_out_of_box_ = true; + } + ShowFirstScreen(first_screen_name); // This keeps the window from flashing at startup. @@ -210,7 +219,10 @@ void WizardController::OnLoginCreateAccount() { } void WizardController::OnNetworkConnected() { - SetCurrentScreen(GetUpdateScreen()); + if (is_out_of_box_) + SetCurrentScreen(GetUpdateScreen()); + else + SetCurrentScreen(GetLoginScreen()); } void WizardController::OnAccountCreated() { @@ -274,7 +286,7 @@ void WizardController::ShowFirstScreen(const std::string& first_screen_name) { } else if (first_screen_name == kUpdateScreenName) { SetCurrentScreen(GetUpdateScreen()); } else { - if (chromeos::UserManager::Get()->GetUsers().empty()) { + if (is_out_of_box_) { SetCurrentScreen(GetNetworkScreen()); } else { SetCurrentScreen(GetLoginScreen()); diff --git a/chrome/browser/chromeos/login/wizard_controller.h b/chrome/browser/chromeos/login/wizard_controller.h index 1ec5993..122918e 100644 --- a/chrome/browser/chromeos/login/wizard_controller.h +++ b/chrome/browser/chromeos/login/wizard_controller.h @@ -105,6 +105,9 @@ class WizardController : public chromeos::ScreenObserver, // Screen that's currently active. WizardScreen* current_screen_; + // True if full OOBE flow should be shown. + bool is_out_of_box_; + // Default WizardController. static WizardController* default_controller_; |