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 14fba6e56da4623b58926fe735a3d544b1af3d1b..59a55524bb567ed57e16e0b77b9f64ee7f847b4f 100644 |
--- a/chrome/browser/sync/profile_sync_service_harness.cc |
+++ b/chrome/browser/sync/profile_sync_service_harness.cc |
@@ -260,7 +260,6 @@ bool ProfileSyncServiceHarness::RunStateChangeMachine() { |
} |
break; |
} |
- GetUpdatedTimestamp(); |
SignalStateCompleteWithNextState(FULLY_SYNCED); |
break; |
} |
@@ -349,7 +348,6 @@ bool ProfileSyncServiceHarness::AwaitSyncCycleCompletion( |
} |
} else { |
// Client is already synced; don't wait. |
- GetUpdatedTimestamp(); |
return true; |
} |
} |
@@ -475,11 +473,15 @@ bool ProfileSyncServiceHarness::MatchesOtherClient( |
other_types.end(), |
inserter(intersection_types, |
intersection_types.begin())); |
- if (intersection_types.empty()) { |
- return true; |
+ for (syncable::ModelTypeSet::iterator i = intersection_types.begin(); |
+ i != intersection_types.end(); |
+ ++i) { |
+ if (!partner->IsSynced() || |
+ partner->GetUpdatedTimestamp(*i) != GetUpdatedTimestamp(*i)) { |
+ return false; |
+ } |
} |
- return partner->IsSynced() && |
- partner->GetUpdatedTimestamp() == GetUpdatedTimestamp(); |
+ return true; |
} |
const SyncSessionSnapshot* |
@@ -569,10 +571,11 @@ void ProfileSyncServiceHarness::DisableSyncForAllDatatypes() { |
"Client " << id_; |
} |
-int64 ProfileSyncServiceHarness::GetUpdatedTimestamp() { |
+std::string ProfileSyncServiceHarness::GetUpdatedTimestamp( |
+ syncable::ModelType model_type) { |
const SyncSessionSnapshot* snap = GetLastSessionSnapshot(); |
DCHECK(snap != NULL) << "GetUpdatedTimestamp(): Sync snapshot is NULL."; |
- return snap->max_local_timestamp; |
+ return snap->download_progress_markers[model_type]; |
} |
void ProfileSyncServiceHarness::LogClientInfo(std::string message) { |
@@ -580,7 +583,8 @@ void ProfileSyncServiceHarness::LogClientInfo(std::string message) { |
const SyncSessionSnapshot* snap = GetLastSessionSnapshot(); |
if (snap) { |
VLOG(1) << "Client " << id_ << ": " << message |
- << ": max_local_timestamp: " << snap->max_local_timestamp |
+ << ": num_updates_downloaded : " |
+ << snap->syncer_status.num_updates_downloaded |
<< ", has_more_to_sync: " << snap->has_more_to_sync |
<< ", unsynced_count: " << snap->unsynced_count |
<< ", num_conflicting_updates: " << snap->num_conflicting_updates |