diff options
author | tim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-15 22:10:28 +0000 |
---|---|---|
committer | tim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-15 22:10:28 +0000 |
commit | d28f328380b8168e5e754d9a56a7088dc815a541 (patch) | |
tree | c98f3978142c816a6537141dd9956fcdc8e0a33f /chrome/browser/sync/engine/syncer.cc | |
parent | 8d167c212898cb233c51abf13913541c86cfd9ae (diff) | |
download | chromium_src-d28f328380b8168e5e754d9a56a7088dc815a541.zip chromium_src-d28f328380b8168e5e754d9a56a7088dc815a541.tar.gz chromium_src-d28f328380b8168e5e754d9a56a7088dc815a541.tar.bz2 |
sync: implement configuration tasks in SyncerThread2
Required shuffling initial_sync_ended bit-setting from SyncerEnd to
ApplyUpdatesCommand.
BUG=26339
TEST=SyncerThread2Test
Review URL: http://codereview.chromium.org/6473008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75015 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/engine/syncer.cc')
-rw-r--r-- | chrome/browser/sync/engine/syncer.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/chrome/browser/sync/engine/syncer.cc b/chrome/browser/sync/engine/syncer.cc index 9ca668e..ac20600 100644 --- a/chrome/browser/sync/engine/syncer.cc +++ b/chrome/browser/sync/engine/syncer.cc @@ -268,13 +268,13 @@ void Syncer::SyncShare(sessions::SyncSession* session, ClearDataCommand clear_data_command; clear_data_command.Execute(session); next_step = SYNCER_END; + break; } case SYNCER_END: { VLOG(1) << "Syncer End"; SyncerEndCommand syncer_end_command; - // This will set "syncing" to false, and send out a notification. syncer_end_command.Execute(session); - goto post_while; + break; } default: LOG(ERROR) << "Unknown command: " << current_step; @@ -283,7 +283,12 @@ void Syncer::SyncShare(sessions::SyncSession* session, break; current_step = next_step; } - post_while: + + // Always send out a cycle ended notification, regardless of end-state. + SyncEngineEvent event(SyncEngineEvent::SYNC_CYCLE_ENDED); + sessions::SyncSessionSnapshot snapshot(session->TakeSnapshot()); + event.snapshot = &snapshot; + session->context()->NotifyListeners(event); return; } |