summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/sync_setup_flow.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/sync_setup_flow.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/sync_setup_flow.cc')
-rw-r--r--chrome/browser/sync/sync_setup_flow.cc17
1 files changed, 13 insertions, 4 deletions
diff --git a/chrome/browser/sync/sync_setup_flow.cc b/chrome/browser/sync/sync_setup_flow.cc
index 7e9f325..ee211f5 100644
--- a/chrome/browser/sync/sync_setup_flow.cc
+++ b/chrome/browser/sync/sync_setup_flow.cc
@@ -396,6 +396,16 @@ void SyncSetupFlow::GetArgsForGaiaLogin(const ProfileSyncService* service,
}
// static
+void SyncSetupFlow::GetArgsForEnterPassphrase(
+ const ProfileSyncService* service, DictionaryValue* args) {
+ args->SetString("iframeToShow", "passphrase");
+ if (service->IsUsingSecondaryPassphrase())
+ args->SetString("mode", "enter");
+ else
+ args->SetString("mode", "gaia");
+}
+
+// static
void SyncSetupFlow::GetArgsForConfigure(ProfileSyncService* service,
DictionaryValue* args) {
args->SetString("iframeToShow", "configure");
@@ -522,10 +532,7 @@ void SyncSetupFlow::Advance(SyncSetupWizard::State advance_state) {
}
case SyncSetupWizard::ENTER_PASSPHRASE: {
DictionaryValue args;
- if (service_->IsUsingSecondaryPassphrase())
- args.SetString("mode", "enter");
- else
- args.SetString("mode", "gaia");
+ SyncSetupFlow::GetArgsForEnterPassphrase(service_, &args);
flow_handler_->ShowPassphraseEntry(args);
break;
}
@@ -587,6 +594,8 @@ SyncSetupFlow* SyncSetupFlow::Run(ProfileSyncService* service,
SyncSetupFlow::GetArgsForGaiaLogin(service, &args);
else if (start == SyncSetupWizard::CONFIGURE)
SyncSetupFlow::GetArgsForConfigure(service, &args);
+ else if (start == SyncSetupWizard::ENTER_PASSPHRASE)
+ SyncSetupFlow::GetArgsForEnterPassphrase(service, &args);
std::string json_args;
base::JSONWriter::Write(&args, false, &json_args);