Index: chrome/browser/sync/test/integration/sync_test.cc |
diff --git a/chrome/browser/sync/test/integration/sync_test.cc b/chrome/browser/sync/test/integration/sync_test.cc |
index 4ca69151917b7512bb3abbbeb019944e0a993ba3..d9bc185cc8f8eafc12e7ef525704fe2bfaf5c7d6 100644 |
--- a/chrome/browser/sync/test/integration/sync_test.cc |
+++ b/chrome/browser/sync/test/integration/sync_test.cc |
@@ -835,17 +835,20 @@ bool SyncTest::EnableEncryption(int index) { |
bool sync_everything = synced_datatypes.Equals(syncer::ModelTypeSet::All()); |
service->OnUserChoseDatatypes(sync_everything, synced_datatypes); |
- // Wait some time to let the enryption finish. |
- EncryptionChecker checker(service); |
- checker.Wait(); |
- |
- return !checker.TimedOut(); |
+ return AwaitEncryptionComplete(index); |
} |
bool SyncTest::IsEncryptionComplete(int index) { |
return ::IsEncryptionComplete(GetClient(index)->service()); |
} |
+bool SyncTest::AwaitEncryptionComplete(int index) { |
+ ProfileSyncService* service = GetClient(index)->service(); |
+ EncryptionChecker checker(service); |
+ checker.Wait(); |
+ return !checker.TimedOut(); |
+} |
+ |
bool SyncTest::AwaitQuiescence() { |
return ProfileSyncServiceHarness::AwaitQuiescence(clients()); |
} |