Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6022)

Unified Diff: chrome/browser/sync/profile_sync_service_harness.cc

Issue 9185031: Avoid SYNC_CYCLE_CONTINUATION sync cycles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sync/engine/sync_scheduler.cc ('k') | chrome/browser/sync/sessions/sync_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/profile_sync_service_harness.cc
diff --git a/chrome/browser/sync/profile_sync_service_harness.cc b/chrome/browser/sync/profile_sync_service_harness.cc
index b2b251e1f8792dfe19f6fdff5d54dd649ae5a9cd..8e8d461f15858846785e1670adc385224143f2c9 100644
--- a/chrome/browser/sync/profile_sync_service_harness.cc
+++ b/chrome/browser/sync/profile_sync_service_harness.cc
@@ -653,7 +653,14 @@ bool ProfileSyncServiceHarness::AwaitMigration(
<< " after migration finish is not WAITING_FOR_NOTHING";
return false;
}
- if (!AwaitFullSyncCompletion(
+ // We must use AwaitDataSyncCompletion rather than the more common
+ // AwaitFullSyncCompletion. As long as crbug.com/97780 is open, we will
+ // rely on self-notifications to ensure that timestamps are udpated, which
+ // allows AwaitFullSyncCompletion to return. However, in some migration
+ // tests these notifications are completely disabled, so the timestamps do
+ // not get updated. This is why we must use the less strict condition,
+ // AwaitDataSyncCompletion.
+ if (!AwaitDataSyncCompletion(
"Config sync cycle after migration cycle")) {
return false;
}
@@ -890,7 +897,7 @@ bool ProfileSyncServiceHarness::EnableSyncForDatatype(
synced_datatypes.Put(syncable::ModelTypeFromInt(datatype));
service()->OnUserChoseDatatypes(false, synced_datatypes);
- if (AwaitFullSyncCompletion("Datatype configuration.")) {
+ if (AwaitDataSyncCompletion("Datatype configuration.")) {
DVLOG(1) << "EnableSyncForDatatype(): Enabled sync for datatype "
<< syncable::ModelTypeToString(datatype)
<< " on " << profile_debug_name_ << ".";
« no previous file with comments | « chrome/browser/sync/engine/sync_scheduler.cc ('k') | chrome/browser/sync/sessions/sync_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698