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

Unified Diff: sync/sessions/sync_session.cc

Issue 152013003: Split up SyncEngineEventListener callbacks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: One more forward declaration Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/sessions/sync_session.h ('k') | sync/sessions/sync_session_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/sessions/sync_session.cc
diff --git a/sync/sessions/sync_session.cc b/sync/sessions/sync_session.cc
index 030ef0f0f5849b7859ebf5db67a887483f75fdf6..957cfbfd741a1558dfa29decab5f4698a5c0a209 100644
--- a/sync/sessions/sync_session.cc
+++ b/sync/sessions/sync_session.cc
@@ -69,20 +69,24 @@ SyncSessionSnapshot SyncSession::TakeSnapshotWithSource(
void SyncSession::SendSyncCycleEndEventNotification(
sync_pb::GetUpdatesCallerInfo::GetUpdatesSource source) {
- SyncEngineEvent event(SyncEngineEvent::SYNC_CYCLE_ENDED);
+ SyncCycleEvent event(SyncCycleEvent::SYNC_CYCLE_ENDED);
event.snapshot = TakeSnapshotWithSource(source);
DVLOG(1) << "Sending cycle end event with snapshot: "
<< event.snapshot.ToString();
- context()->NotifyListeners(event);
+ FOR_EACH_OBSERVER(SyncEngineEventListener,
+ *(context_->listeners()),
+ OnSyncCycleEvent(event));
}
-void SyncSession::SendEventNotification(SyncEngineEvent::EventCause cause) {
- SyncEngineEvent event(cause);
+void SyncSession::SendEventNotification(SyncCycleEvent::EventCause cause) {
+ SyncCycleEvent event(cause);
event.snapshot = TakeSnapshot();
DVLOG(1) << "Sending event with snapshot: " << event.snapshot.ToString();
- context()->NotifyListeners(event);
+ FOR_EACH_OBSERVER(SyncEngineEventListener,
+ *(context_->listeners()),
+ OnSyncCycleEvent(event));
}
} // namespace sessions
« no previous file with comments | « sync/sessions/sync_session.h ('k') | sync/sessions/sync_session_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698