Commit 1a315b40 authored by atwilson@chromium.org's avatar atwilson@chromium.org

Added support for setting gaia_passphrase in SyncSetupFlow::OnUserConfigured.

BUG=91595
TEST=none, no code uses this yet

Review URL: http://codereview.chromium.org/7508036

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95439 0039d316-1c4b-4281-b951-d872f2087c98
parent cc626933
...@@ -273,6 +273,13 @@ void SyncSetupFlow::OnUserConfigured(const SyncConfiguration& configuration) { ...@@ -273,6 +273,13 @@ void SyncSetupFlow::OnUserConfigured(const SyncConfiguration& configuration) {
!configuration.use_secondary_passphrase || !configuration.use_secondary_passphrase ||
configuration.secondary_passphrase.length() > 0); configuration.secondary_passphrase.length() > 0);
if (!configuration.gaia_passphrase.empty()) {
// Caller passed a gaia passphrase. This is illegal if we are currently
// using a secondary passphrase.
DCHECK(!service_->IsUsingSecondaryPassphrase());
service_->SetPassphrase(configuration.gaia_passphrase, false, false);
}
if (configuration.use_secondary_passphrase) { if (configuration.use_secondary_passphrase) {
if (!service_->IsUsingSecondaryPassphrase()) { if (!service_->IsUsingSecondaryPassphrase()) {
service_->SetPassphrase(configuration.secondary_passphrase, true, true); service_->SetPassphrase(configuration.secondary_passphrase, true, true);
......
...@@ -33,6 +33,7 @@ struct SyncConfiguration { ...@@ -33,6 +33,7 @@ struct SyncConfiguration {
syncable::ModelTypeSet data_types; syncable::ModelTypeSet data_types;
bool use_secondary_passphrase; bool use_secondary_passphrase;
std::string secondary_passphrase; std::string secondary_passphrase;
std::string gaia_passphrase;
}; };
// The state machine used by SyncSetupWizard, exposed in its own header // The state machine used by SyncSetupWizard, exposed in its own header
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment