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

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

Issue 275913004: Add a pref to track progress of OOBE and resume if needed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/stage/screen/g Created 6 years, 7 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
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 f2486d71f4d78838bff6e77084724b26bed56a37..f1463aae4b0ca7749c60f1022e21810eaa023f6e 100644
--- a/chrome/browser/chromeos/login/wizard_controller.cc
+++ b/chrome/browser/chromeos/login/wizard_controller.cc
@@ -209,9 +209,16 @@ void WizardController::Init(
}
}
- AdvanceToScreen(first_screen_name);
+ bool shoud_not_resume = is_out_of_box_ && !first_screen_name.empty() &&
ygorshenin1 2014/05/16 13:03:29 nit: could you please replace "should_not_resume =
pastarmovj 2014/05/19 14:12:27 Actually compacted the logic further and i even th
+ first_screen_name != WizardController::kTestNoScreenName;
+ const PrefService::Preference* oobe_stage_pref =
+ GetLocalState()->FindPreference(prefs::kOobeScreenPending);
+ if (!oobe_stage_pref->IsDefaultValue() && !shoud_not_resume)
+ first_screen_name_ = GetLocalState()->GetString(prefs::kOobeScreenPending);
+
+ AdvanceToScreen(first_screen_name_);
if (!IsMachineHWIDCorrect() && !StartupUtils::IsDeviceRegistered() &&
- first_screen_name.empty())
+ first_screen_name_.empty())
ShowWrongHWIDScreen();
}
@@ -713,6 +720,10 @@ void WizardController::PerformOOBECompletedActions() {
}
void WizardController::SetCurrentScreen(WizardScreen* new_current) {
+ // First remember how far have we reached so that we can resume if needed.
Mattias Nissler (ping if slow) 2014/05/15 09:30:25 So there are some interstitial screens that we may
ygorshenin1 2014/05/16 13:03:29 Yes, we definitely shouldn't return to the error s
pastarmovj 2014/05/19 14:12:27 Ok new proposal implemented below is only store th
+ if (is_out_of_box_)
+ StartupUtils::SaveOobePendingScreen(new_current->GetName());
+
SetCurrentScreenSmooth(new_current, false);
}
@@ -761,6 +772,10 @@ void WizardController::SetStatusAreaVisible(bool visible) {
}
void WizardController::AdvanceToScreen(const std::string& screen_name) {
+ // First remember how far have we reached so that we can resume if needed.
+ if (is_out_of_box_)
+ StartupUtils::SaveOobePendingScreen(screen_name);
+
if (screen_name == kNetworkScreenName) {
ShowNetworkScreen();
} else if (screen_name == kLoginScreenName) {

Powered by Google App Engine
This is Rietveld 408576698