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

Unified Diff: jingle/notifier/listener/non_blocking_push_client.cc

Issue 2419693006: Remove usage of FOR_EACH_OBSERVER macro in jingle (Closed)
Patch Set: 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
« no previous file with comments | « jingle/notifier/listener/fake_push_client.cc ('k') | jingle/notifier/listener/xmpp_push_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: jingle/notifier/listener/non_blocking_push_client.cc
diff --git a/jingle/notifier/listener/non_blocking_push_client.cc b/jingle/notifier/listener/non_blocking_push_client.cc
index 4596657aa63b369c4c09b331c668c5a36b97a152..4b7309d137393542cb2ac978c3062153523d880b 100644
--- a/jingle/notifier/listener/non_blocking_push_client.cc
+++ b/jingle/notifier/listener/non_blocking_push_client.cc
@@ -218,27 +218,28 @@ void NonBlockingPushClient::SendPing() {
void NonBlockingPushClient::OnNotificationsEnabled() {
DCHECK(thread_checker_.CalledOnValidThread());
- FOR_EACH_OBSERVER(PushClientObserver, observers_,
- OnNotificationsEnabled());
+ for (auto& observer : observers_)
+ observer.OnNotificationsEnabled();
}
void NonBlockingPushClient::OnNotificationsDisabled(
NotificationsDisabledReason reason) {
DCHECK(thread_checker_.CalledOnValidThread());
- FOR_EACH_OBSERVER(PushClientObserver, observers_,
- OnNotificationsDisabled(reason));
+ for (auto& observer : observers_)
+ observer.OnNotificationsDisabled(reason);
}
void NonBlockingPushClient::OnIncomingNotification(
const Notification& notification) {
DCHECK(thread_checker_.CalledOnValidThread());
- FOR_EACH_OBSERVER(PushClientObserver, observers_,
- OnIncomingNotification(notification));
+ for (auto& observer : observers_)
+ observer.OnIncomingNotification(notification);
}
void NonBlockingPushClient::OnPingResponse() {
DCHECK(thread_checker_.CalledOnValidThread());
- FOR_EACH_OBSERVER(PushClientObserver, observers_, OnPingResponse());
+ for (auto& observer : observers_)
+ observer.OnPingResponse();
}
} // namespace notifier
« no previous file with comments | « jingle/notifier/listener/fake_push_client.cc ('k') | jingle/notifier/listener/xmpp_push_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698