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

Side by Side Diff: chrome/browser/sync/engine/syncer_end_command.cc

Issue 6690020: sync: hook up ServerConnectionManager <> SyncerThread2 and tie up more loose ends (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/debug
Patch Set: rebase Created 9 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/sync/engine/syncer_end_command.h" 5 #include "chrome/browser/sync/engine/syncer_end_command.h"
6 6
7 #include "chrome/browser/sync/engine/syncer_types.h" 7 #include "chrome/browser/sync/engine/syncer_types.h"
8 #include "chrome/browser/sync/sessions/sync_session.h" 8 #include "chrome/browser/sync/sessions/sync_session.h"
9 #include "chrome/browser/sync/syncable/directory_manager.h" 9 #include "chrome/browser/sync/syncable/directory_manager.h"
10 #include "chrome/common/deprecated/event_sys-inl.h" 10 #include "chrome/common/deprecated/event_sys-inl.h"
11 11
12 namespace browser_sync { 12 namespace browser_sync {
13 13
14 SyncerEndCommand::SyncerEndCommand() {} 14 SyncerEndCommand::SyncerEndCommand() {}
15 SyncerEndCommand::~SyncerEndCommand() {} 15 SyncerEndCommand::~SyncerEndCommand() {}
16 16
17 void SyncerEndCommand::ExecuteImpl(sessions::SyncSession* session) { 17 void SyncerEndCommand::ExecuteImpl(sessions::SyncSession* session) {
18 sessions::StatusController* status(session->status_controller()); 18 // Always send out a cycle ended notification, regardless of end-state.
19 status->set_syncing(false); 19 session->status_controller()->set_syncing(false);
20 session->context()->set_previous_session_routing_info( 20 SyncEngineEvent event(SyncEngineEvent::SYNC_CYCLE_ENDED);
21 session->routing_info()); 21 sessions::SyncSessionSnapshot snapshot(session->TakeSnapshot());
22 event.snapshot = &snapshot;
23 session->context()->NotifyListeners(event);
22 session->context()->set_last_snapshot(session->TakeSnapshot()); 24 session->context()->set_last_snapshot(session->TakeSnapshot());
23 } 25 }
24 26
25 } // namespace browser_sync 27 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698