diff options
author | tim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-29 21:42:16 +0000 |
---|---|---|
committer | tim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-29 21:42:16 +0000 |
commit | 7ad97cfaa797bb5fa77fa101336b90f883250600 (patch) | |
tree | 90f7a9a6dfe902ccf1b953d26e628778fd004538 | |
parent | 756ad2bb6e5482f3ef40a801e7a2011a0b3c774a (diff) | |
download | chromium_src-7ad97cfaa797bb5fa77fa101336b90f883250600.zip chromium_src-7ad97cfaa797bb5fa77fa101336b90f883250600.tar.gz chromium_src-7ad97cfaa797bb5fa77fa101336b90f883250600.tar.bz2 |
sync: if we've reached the end of the setup wizard, always set setup bit.
This helps the chrome os ASP-enabled signin case, since we "end" on the
GAIA_SUCCESS state.
BUG=90767
TEST=SyncSetupWizardTest.CrosAuthSetup
Review URL: http://codereview.chromium.org/7539003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94763 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/sync/sync_setup_flow.cc | 4 | ||||
-rw-r--r-- | chrome/browser/sync/sync_setup_wizard_unittest.cc | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/sync/sync_setup_flow.cc b/chrome/browser/sync/sync_setup_flow.cc index c2cc1b3..8230ce9 100644 --- a/chrome/browser/sync/sync_setup_flow.cc +++ b/chrome/browser/sync/sync_setup_flow.cc @@ -214,7 +214,9 @@ void SyncSetupFlow::Focus() { void SyncSetupFlow::OnDialogClosed(const std::string& json_retval) { DCHECK(json_retval.empty()); container_->set_flow(NULL); // Sever ties from the wizard. - if (current_state_ == SyncSetupWizard::DONE) + // If we've reached the end, mark it. This could be a discrete run, in which + // case it's already set, but it simplifes the logic to do it this way. + if (current_state_ == end_state_) service_->SetSyncSetupCompleted(); // Record the state at which the user cancelled the signon dialog. diff --git a/chrome/browser/sync/sync_setup_wizard_unittest.cc b/chrome/browser/sync/sync_setup_wizard_unittest.cc index 2a9a6fe..141361c 100644 --- a/chrome/browser/sync/sync_setup_wizard_unittest.cc +++ b/chrome/browser/sync/sync_setup_wizard_unittest.cc @@ -515,6 +515,8 @@ TEST_F(SyncSetupWizardTest, CrosAuthSetup) { EXPECT_FALSE(editable); wizard_->Step(SyncSetupWizard::GAIA_SUCCESS); EXPECT_TRUE(service_->user_cancelled_dialog_); + EXPECT_TRUE(service_->profile()->GetPrefs()->GetBoolean( + prefs::kSyncHasSetupCompleted)); } TEST_F(SyncSetupWizardTest, NonFatalError) { |