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

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

Issue 2075012: Replace changes_channel with an observer list. (Closed)
Patch Set: Ready for checkin Created 10 years, 6 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
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"
(...skipping 23 matching lines...) Expand all
34 if (status->updates_request_parameters().data_types[i]) { 34 if (status->updates_request_parameters().data_types[i]) {
35 // This gets persisted to the directory's backing store. 35 // This gets persisted to the directory's backing store.
36 dir->set_initial_sync_ended_for_type(model_type, true); 36 dir->set_initial_sync_ended_for_type(model_type, true);
37 } 37 }
38 } 38 }
39 } 39 }
40 40
41 SyncerEvent event(SyncerEvent::SYNC_CYCLE_ENDED); 41 SyncerEvent event(SyncerEvent::SYNC_CYCLE_ENDED);
42 sessions::SyncSessionSnapshot snapshot(session->TakeSnapshot()); 42 sessions::SyncSessionSnapshot snapshot(session->TakeSnapshot());
43 event.snapshot = &snapshot; 43 event.snapshot = &snapshot;
44 session->context()->syncer_event_channel()->NotifyListeners(event); 44 session->context()->syncer_event_channel()->Notify(event);
45 } 45 }
46 46
47 } // namespace browser_sync 47 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/engine/syncer_command.cc ('k') | chrome/browser/sync/engine/syncer_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698