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

Unified Diff: remoting/host/daemon_process.cc

Issue 2425483002: Remove usage of FOR_EACH_OBSERVER macro in remoting (Closed)
Patch Set: braces 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 | « remoting/host/chromoting_host.cc ('k') | remoting/protocol/webrtc_audio_source_adapter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/daemon_process.cc
diff --git a/remoting/host/daemon_process.cc b/remoting/host/daemon_process.cc
index ad00c95eb6fa94cce9da07eabf1842fcd04e743f..cc9f76cdb0fceb0508c1527550add0ff76a98c05 100644
--- a/remoting/host/daemon_process.cc
+++ b/remoting/host/daemon_process.cc
@@ -303,28 +303,29 @@ bool DaemonProcess::WasTerminalIdAllocated(int terminal_id) {
void DaemonProcess::OnAccessDenied(const std::string& jid) {
DCHECK(caller_task_runner()->BelongsToCurrentThread());
- FOR_EACH_OBSERVER(HostStatusObserver, status_observers_, OnAccessDenied(jid));
+ for (auto& observer : status_observers_)
+ observer.OnAccessDenied(jid);
}
void DaemonProcess::OnClientAuthenticated(const std::string& jid) {
DCHECK(caller_task_runner()->BelongsToCurrentThread());
- FOR_EACH_OBSERVER(HostStatusObserver, status_observers_,
- OnClientAuthenticated(jid));
+ for (auto& observer : status_observers_)
+ observer.OnClientAuthenticated(jid);
}
void DaemonProcess::OnClientConnected(const std::string& jid) {
DCHECK(caller_task_runner()->BelongsToCurrentThread());
- FOR_EACH_OBSERVER(HostStatusObserver, status_observers_,
- OnClientConnected(jid));
+ for (auto& observer : status_observers_)
+ observer.OnClientConnected(jid);
}
void DaemonProcess::OnClientDisconnected(const std::string& jid) {
DCHECK(caller_task_runner()->BelongsToCurrentThread());
- FOR_EACH_OBSERVER(HostStatusObserver, status_observers_,
- OnClientDisconnected(jid));
+ for (auto& observer : status_observers_)
+ observer.OnClientDisconnected(jid);
}
void DaemonProcess::OnClientRouteChange(const std::string& jid,
@@ -343,20 +344,22 @@ void DaemonProcess::OnClientRouteChange(const std::string& jid,
CHECK(local_ip.empty() || local_ip.IsValid());
parsed_route.local_address = net::IPEndPoint(local_ip, route.local_port);
- FOR_EACH_OBSERVER(HostStatusObserver, status_observers_,
- OnClientRouteChange(jid, channel_name, parsed_route));
+ for (auto& observer : status_observers_)
+ observer.OnClientRouteChange(jid, channel_name, parsed_route);
}
void DaemonProcess::OnHostStarted(const std::string& xmpp_login) {
DCHECK(caller_task_runner()->BelongsToCurrentThread());
- FOR_EACH_OBSERVER(HostStatusObserver, status_observers_, OnStart(xmpp_login));
+ for (auto& observer : status_observers_)
+ observer.OnStart(xmpp_login);
}
void DaemonProcess::OnHostShutdown() {
DCHECK(caller_task_runner()->BelongsToCurrentThread());
- FOR_EACH_OBSERVER(HostStatusObserver, status_observers_, OnShutdown());
+ for (auto& observer : status_observers_)
+ observer.OnShutdown();
}
void DaemonProcess::DeleteAllDesktopSessions() {
« no previous file with comments | « remoting/host/chromoting_host.cc ('k') | remoting/protocol/webrtc_audio_source_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698