Chromium Code Reviews| 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..bb2c65e84c05a055fe53d906f8bc5d256c97b8fe 100644 |
| --- a/chrome/browser/chromeos/login/wizard_controller.cc |
| +++ b/chrome/browser/chromeos/login/wizard_controller.cc |
| @@ -209,9 +209,20 @@ void WizardController::Init( |
| } |
| } |
| - AdvanceToScreen(first_screen_name); |
| + bool shoud_not_resume = false; |
|
Mattias Nissler (ping if slow)
2014/05/14 13:39:03
This could just be should_not_resume = <condition-
pastarmovj
2014/05/14 14:23:49
True. This code was going through a couple of vers
|
| + if (is_out_of_box_ && !first_screen_name.empty() && |
| + first_screen_name != WizardController::kTestNoScreenName) { |
| + shoud_not_resume = true; |
| + } |
| + const PrefService::Preference* oobe_stage_pref = |
| + GetLocalState()->FindPreference(prefs::kOobeStagePending); |
|
Mattias Nissler (ping if slow)
2014/05/14 13:39:03
it's a bit confusing that the new code calls this
|
| + if (!oobe_stage_pref->IsDefaultValue() && !shoud_not_resume) { |
|
Mattias Nissler (ping if slow)
2014/05/14 13:39:03
Why would you need a default value check here?
Mattias Nissler (ping if slow)
2014/05/14 13:39:03
nit: no curlies required.
pastarmovj
2014/05/14 14:23:49
If there is no value set we don't need to interven
Mattias Nissler (ping if slow)
2014/05/14 14:54:41
Well, you could just check for empty string I gues
pastarmovj
2014/05/14 15:26:44
I think doing the check this way is more efficient
Mattias Nissler (ping if slow)
2014/05/15 09:30:25
I don't think efficiency matters at all here (it's
|
| + first_screen_name_ = GetLocalState()->GetString(prefs::kOobeStagePending); |
| + } |
| + |
| + AdvanceToScreen(first_screen_name_); |
| if (!IsMachineHWIDCorrect() && !StartupUtils::IsDeviceRegistered() && |
| - first_screen_name.empty()) |
| + first_screen_name_.empty()) |
| ShowWrongHWIDScreen(); |
| } |
| @@ -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. |
|
Mattias Nissler (ping if slow)
2014/05/14 13:39:03
Most transitions go through SetCurrentScreen inste
pastarmovj
2014/05/14 14:23:49
Yep missed that one but now it is added and I veri
|
| + if (is_out_of_box_) |
| + StartupUtils::SaveOobePendingStage(screen_name); |
| + |
| if (screen_name == kNetworkScreenName) { |
| ShowNetworkScreen(); |
| } else if (screen_name == kLoginScreenName) { |