summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlipalani@chromium.org <lipalani@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-18 18:49:17 +0000
committerlipalani@chromium.org <lipalani@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-18 18:49:17 +0000
commit3baf9ba305c457093d087019aa66bd32f254dcff (patch)
treee80083b499659aa4ad9bd98aade8b1361a836e5b
parent3258c76f00d919e081843e04efe43d4e2712c3bd (diff)
downloadchromium_src-3baf9ba305c457093d087019aa66bd32f254dcff.zip
chromium_src-3baf9ba305c457093d087019aa66bd32f254dcff.tar.gz
chromium_src-3baf9ba305c457093d087019aa66bd32f254dcff.tar.bz2
Merge 85722 - Ensure new gaia password gets picked up as the new passphrase.
BUG=76128 TEST= Review URL: http://codereview.chromium.org/7029023 TBR=lipalani@chromium.org Review URL: http://codereview.chromium.org/7034032 git-svn-id: svn://svn.chromium.org/chrome/branches/742/src@85789 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/sync/profile_sync_service.cc16
1 files changed, 10 insertions, 6 deletions
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index 6d56f1c..a75c1b8 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -1109,9 +1109,13 @@ void ProfileSyncService::SetPassphrase(const std::string& passphrase,
if (ShouldPushChanges() || observed_passphrase_required_) {
backend_->SetPassphrase(passphrase, is_explicit);
} else {
- cached_passphrase_.value = passphrase;
- cached_passphrase_.is_explicit = is_explicit;
- cached_passphrase_.is_creation = is_creation;
+ if (is_explicit) {
+ cached_passphrase_.value = passphrase;
+ cached_passphrase_.is_explicit = is_explicit;
+ cached_passphrase_.is_creation = is_creation;
+ } else {
+ gaia_password_ = passphrase;
+ }
}
}
@@ -1145,12 +1149,12 @@ void ProfileSyncService::Observe(NotificationType type,
expect_sync_configuration_aborted_ = false;
return;
}
+ // Clear out the gaia password if it is already there.
+ gaia_password_ = std::string();
if (result != DataTypeManager::OK) {
std::string message = StringPrintf("Sync Configuration failed with %d",
result);
OnUnrecoverableError(*(result_with_location->location), message);
-
- gaia_password_ = std::string();
cached_passphrase_ = CachedPassphrase();
return;
}
@@ -1209,7 +1213,7 @@ void ProfileSyncService::Observe(NotificationType type,
// actually change), or the user has an explicit passphrase set so this
// becomes a no-op.
tried_implicit_gaia_remove_when_bug_62103_fixed_ = true;
- gaia_password_ = successful->password;
+ SetPassphrase(successful->password, false, true);
// If this signin was to initiate a passphrase migration (on the
// first computer, thus not for decryption), continue the migration.