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

Unified Diff: components/sync/engine_impl/cycle/sync_cycle.cc

Issue 2424673002: Remove usage of FOR_EACH_OBSERVER macro in components/sync (Closed)
Patch Set: blank line before return Created 4 years, 2 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
Index: components/sync/engine_impl/cycle/sync_cycle.cc
diff --git a/components/sync/engine_impl/cycle/sync_cycle.cc b/components/sync/engine_impl/cycle/sync_cycle.cc
index d56f9dba50333a33c107007e4da00a5c29bcc616..a65d69c2f0eb0e1186c51f19103f034c4f62b42b 100644
--- a/components/sync/engine_impl/cycle/sync_cycle.cc
+++ b/components/sync/engine_impl/cycle/sync_cycle.cc
@@ -65,8 +65,8 @@ void SyncCycle::SendSyncCycleEndEventNotification(
DVLOG(1) << "Sending cycle end event with snapshot: "
<< event.snapshot.ToString();
- FOR_EACH_OBSERVER(SyncEngineEventListener, *(context_->listeners()),
- OnSyncCycleEvent(event));
+ for (auto& observer : *context_->listeners())
+ observer.OnSyncCycleEvent(event);
}
void SyncCycle::SendEventNotification(SyncCycleEvent::EventCause cause) {
@@ -74,13 +74,13 @@ void SyncCycle::SendEventNotification(SyncCycleEvent::EventCause cause) {
event.snapshot = TakeSnapshot();
DVLOG(1) << "Sending event with snapshot: " << event.snapshot.ToString();
- FOR_EACH_OBSERVER(SyncEngineEventListener, *(context_->listeners()),
- OnSyncCycleEvent(event));
+ for (auto& observer : *context_->listeners())
+ observer.OnSyncCycleEvent(event);
}
void SyncCycle::SendProtocolEvent(const ProtocolEvent& event) {
- FOR_EACH_OBSERVER(SyncEngineEventListener, *(context_->listeners()),
- OnProtocolEvent(event));
+ for (auto& observer : *context_->listeners())
+ observer.OnProtocolEvent(event);
}
} // namespace syncer

Powered by Google App Engine
This is Rietveld 408576698