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

Unified Diff: jingle/notifier/listener/xmpp_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/non_blocking_push_client.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: jingle/notifier/listener/xmpp_push_client.cc
diff --git a/jingle/notifier/listener/xmpp_push_client.cc b/jingle/notifier/listener/xmpp_push_client.cc
index 4083e23d417c8080de2204fe32e93176af3e1b8e..0fe9c88cf8ad659690d1ba8c82ef85d17564897e 100644
--- a/jingle/notifier/listener/xmpp_push_client.cc
+++ b/jingle/notifier/listener/xmpp_push_client.cc
@@ -63,41 +63,41 @@ void XmppPushClient::OnTransientDisconnection() {
DCHECK(thread_checker_.CalledOnValidThread());
DVLOG(1) << "Push: Transient disconnection";
base_task_.reset();
- FOR_EACH_OBSERVER(PushClientObserver, observers_,
- OnNotificationsDisabled(TRANSIENT_NOTIFICATION_ERROR));
+ for (auto& observer : observers_)
+ observer.OnNotificationsDisabled(TRANSIENT_NOTIFICATION_ERROR);
}
void XmppPushClient::OnCredentialsRejected() {
DCHECK(thread_checker_.CalledOnValidThread());
DVLOG(1) << "Push: Credentials rejected";
base_task_.reset();
- FOR_EACH_OBSERVER(
- PushClientObserver, observers_,
- OnNotificationsDisabled(NOTIFICATION_CREDENTIALS_REJECTED));
+ for (auto& observer : observers_)
+ observer.OnNotificationsDisabled(NOTIFICATION_CREDENTIALS_REJECTED);
}
void XmppPushClient::OnNotificationReceived(
const Notification& notification) {
DCHECK(thread_checker_.CalledOnValidThread());
- FOR_EACH_OBSERVER(PushClientObserver, observers_,
- OnIncomingNotification(notification));
+ for (auto& observer : observers_)
+ observer.OnIncomingNotification(notification);
}
void XmppPushClient::OnPingResponseReceived() {
DCHECK(thread_checker_.CalledOnValidThread());
- FOR_EACH_OBSERVER(PushClientObserver, observers_, OnPingResponse());
+ for (auto& observer : observers_)
+ observer.OnPingResponse();
}
void XmppPushClient::OnSubscribed() {
DCHECK(thread_checker_.CalledOnValidThread());
- FOR_EACH_OBSERVER(PushClientObserver, observers_,
- OnNotificationsEnabled());
+ for (auto& observer : observers_)
+ observer.OnNotificationsEnabled();
}
void XmppPushClient::OnSubscriptionError() {
DCHECK(thread_checker_.CalledOnValidThread());
- FOR_EACH_OBSERVER(PushClientObserver, observers_,
- OnNotificationsDisabled(TRANSIENT_NOTIFICATION_ERROR));
+ for (auto& observer : observers_)
+ observer.OnNotificationsDisabled(TRANSIENT_NOTIFICATION_ERROR);
}
void XmppPushClient::AddObserver(PushClientObserver* observer) {
« no previous file with comments | « jingle/notifier/listener/non_blocking_push_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698