diff options
author | tim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-19 19:36:34 +0000 |
---|---|---|
committer | tim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-19 19:36:34 +0000 |
commit | a03c04800033b9400a7fa4559157ef098a5d4721 (patch) | |
tree | e5e17db7a2858c37d96eb89ab9ca5503e36db222 /chrome/browser/sync/engine | |
parent | 95b7d5ff5805da8d26b83abe41e93a27cfb41bcd (diff) | |
download | chromium_src-a03c04800033b9400a7fa4559157ef098a5d4721.zip chromium_src-a03c04800033b9400a7fa4559157ef098a5d4721.tar.gz chromium_src-a03c04800033b9400a7fa4559157ef098a5d4721.tar.bz2 |
Improve the integration test harness by using the max_local_timestamp
from the sync engine rather than waiting for "a couple syncs" to happen
before declaring sync "done".
BUG=37351
Review URL: http://codereview.chromium.org/1042008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42134 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/engine')
-rw-r--r-- | chrome/browser/sync/engine/syncapi.cc | 2 | ||||
-rw-r--r-- | chrome/browser/sync/engine/syncapi.h | 11 |
2 files changed, 8 insertions, 5 deletions
diff --git a/chrome/browser/sync/engine/syncapi.cc b/chrome/browser/sync/engine/syncapi.cc index 433475c..e807d3d 100644 --- a/chrome/browser/sync/engine/syncapi.cc +++ b/chrome/browser/sync/engine/syncapi.cc @@ -1739,7 +1739,7 @@ void SyncManager::SyncInternal::HandleSyncerEvent(const SyncerEvent& event) { // whether we should sync again. if (event.what_happened == SyncerEvent::SYNC_CYCLE_ENDED) { if (!event.snapshot->has_more_to_sync) { - observer_->OnSyncCycleCompleted(); + observer_->OnSyncCycleCompleted(event.snapshot); } // TODO(chron): Consider changing this back to track has_more_to_sync diff --git a/chrome/browser/sync/engine/syncapi.h b/chrome/browser/sync/engine/syncapi.h index ca1cc01..98aeeb9 100644 --- a/chrome/browser/sync/engine/syncapi.h +++ b/chrome/browser/sync/engine/syncapi.h @@ -53,6 +53,10 @@ namespace browser_sync { class ModelSafeWorkerRegistrar; + +namespace sessions { +struct SyncSessionSnapshot; +} } // Forward declarations of internal class types so that sync API objects @@ -564,10 +568,9 @@ class SyncManager { int change_count) = 0; // A round-trip sync-cycle took place and the syncer has resolved any - // conflicts that may have arisen. This is kept separate from - // OnStatusChanged as there isn't really any state update; it is plainly - // a notification of a state transition. - virtual void OnSyncCycleCompleted() = 0; + // conflicts that may have arisen. + virtual void OnSyncCycleCompleted( + const browser_sync::sessions::SyncSessionSnapshot* snapshot) = 0; // Called when user interaction may be required due to an auth problem. virtual void OnAuthError(const GoogleServiceAuthError& auth_error) = 0; |