summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/profile_sync_service.cc
diff options
context:
space:
mode:
authortim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-20 14:45:46 +0000
committertim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-20 14:45:46 +0000
commit54e6e79cce665b06c965d58852f0c6362b9ba567 (patch)
treef02a6f7a81c6887236a9924f617af9c7c8e659d9 /chrome/browser/sync/profile_sync_service.cc
parent2aec43172688976197ded8e35a485c7351ff30ed (diff)
downloadchromium_src-54e6e79cce665b06c965d58852f0c6362b9ba567.zip
chromium_src-54e6e79cce665b06c965d58852f0c6362b9ba567.tar.gz
chromium_src-54e6e79cce665b06c965d58852f0c6362b9ba567.tar.bz2
sync: fix passphrase bootstrapping and more.
BUG=59684, 59631 TEST=Enable password sync on two clients with default gaia passphrase. Change it to use a secondary on one of the clients, wait for error to surface on other client, restart chrome, notice "sync error", enter passphrase, have things work out. Also, password sync integration test. Review URL: http://codereview.chromium.org/3803012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63212 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/profile_sync_service.cc')
-rw-r--r--chrome/browser/sync/profile_sync_service.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index 5b92998..c5d5139 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -335,6 +335,8 @@ void ProfileSyncService::ClearPreferences() {
pref_service->ClearPref(prefs::kSyncLastSyncedTime);
pref_service->ClearPref(prefs::kSyncHasSetupCompleted);
pref_service->ClearPref(prefs::kEncryptionBootstrapToken);
+ pref_service->ClearPref(prefs::kSyncUsingSecondaryPassphrase);
+
// TODO(nick): The current behavior does not clear e.g. prefs::kSyncBookmarks.
// Is that really what we want?
pref_service->ScheduleSavePersistentPrefs();
@@ -979,12 +981,11 @@ void ProfileSyncService::Observe(NotificationType type,
break;
}
- if (SetupInProgress()) {
+ if (WizardIsVisible()) {
wizard_.Step(SyncSetupWizard::ENTER_PASSPHRASE);
- } else {
- UpdateAuthErrorState(GoogleServiceAuthError(
- GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS));
}
+
+ FOR_EACH_OBSERVER(Observer, observers_, OnStateChanged());
break;
}
case NotificationType::SYNC_DATA_TYPES_UPDATED: {
@@ -1004,6 +1005,7 @@ void ProfileSyncService::Observe(NotificationType type,
FOR_EACH_OBSERVER(Observer, observers_, OnStateChanged());
observed_passphrase_required_ = false;
+
wizard_.Step(SyncSetupWizard::DONE);
break;
}