summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorrsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-26 10:26:57 +0000
committerrsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-26 10:26:57 +0000
commit113f3910e87fa07dafe009ed57a9aa4aa6865a0f (patch)
tree97269d87d220f21b0b631c96334429cb27b01f80 /chrome/browser
parent54791916dea1677e64e8ed86cb565d010d9500cd (diff)
downloadchromium_src-113f3910e87fa07dafe009ed57a9aa4aa6865a0f.zip
chromium_src-113f3910e87fa07dafe009ed57a9aa4aa6865a0f.tar.gz
chromium_src-113f3910e87fa07dafe009ed57a9aa4aa6865a0f.tar.bz2
Add additional check for required passphrase in SetupSync
The sync integration tests use a method called SetupSync to initialize a sync client. The step that performs an initial sync can sometimes remain incomplete due to a required passphrase. r93873 relocated the check for SET_PASSPHRASE_FAILED in SetupSync. It turns out that this check needs to be made before and after initial sync, since SET_PASSPHRASE_FAILED can be triggered in a couple of places. This patch adds a check at the original place, and should fix the flaky test SetPassphraseAndThenSetupSync. TBR=zea@chromium.org BUG=90371, 90397 TEST=sync_integration_tests Review URL: http://codereview.chromium.org/7477006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94076 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/sync/profile_sync_service_harness.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/sync/profile_sync_service_harness.cc b/chrome/browser/sync/profile_sync_service_harness.cc
index a1c7a30..44ef947 100644
--- a/chrome/browser/sync/profile_sync_service_harness.cc
+++ b/chrome/browser/sync/profile_sync_service_harness.cc
@@ -191,6 +191,13 @@ bool ProfileSyncServiceHarness::SetupSync(
return false;
}
+ // Make sure that initial sync wasn't blocked by a missing passphrase.
+ if (wait_state_ == SET_PASSPHRASE_FAILED) {
+ LOG(ERROR) << "A passphrase is required for decryption. Sync cannot proceed"
+ " until SetPassphrase is called.";
+ return false;
+ }
+
// Indicate to the browser that sync setup is complete.
service()->SetSyncSetupCompleted();