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

Unified Diff: remoting/test/test_chromoting_client.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/signaling/xmpp_signal_strategy.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/test/test_chromoting_client.cc
diff --git a/remoting/test/test_chromoting_client.cc b/remoting/test/test_chromoting_client.cc
index 4e5eb3245361f489eb85f12f4be3568aa87125d8..cdbb8d97d3b6534df455166754de617e02ea354b 100644
--- a/remoting/test/test_chromoting_client.cc
+++ b/remoting/test/test_chromoting_client.cc
@@ -197,16 +197,16 @@ void TestChromotingClient::OnConnectionState(
connection_error_code_ = error_code;
connection_to_host_state_ = state;
- FOR_EACH_OBSERVER(RemoteConnectionObserver, connection_observers_,
- ConnectionStateChanged(state, error_code));
+ for (auto& observer : connection_observers_)
+ observer.ConnectionStateChanged(state, error_code);
}
void TestChromotingClient::OnConnectionReady(bool ready) {
VLOG(1) << "TestChromotingClient::OnConnectionReady("
<< "ready:" << ready << ") Called";
- FOR_EACH_OBSERVER(RemoteConnectionObserver, connection_observers_,
- ConnectionReady(ready));
+ for (auto& observer : connection_observers_)
+ observer.ConnectionReady(ready);
}
void TestChromotingClient::OnRouteChanged(
@@ -217,16 +217,16 @@ void TestChromotingClient::OnRouteChanged(
<< "route:" << protocol::TransportRoute::GetTypeString(route.type)
<< ") Called";
- FOR_EACH_OBSERVER(RemoteConnectionObserver, connection_observers_,
- RouteChanged(channel_name, route));
+ for (auto& observer : connection_observers_)
+ observer.RouteChanged(channel_name, route);
}
void TestChromotingClient::SetCapabilities(const std::string& capabilities) {
VLOG(1) << "TestChromotingClient::SetCapabilities("
<< "capabilities: " << capabilities << ") Called";
- FOR_EACH_OBSERVER(RemoteConnectionObserver, connection_observers_,
- CapabilitiesSet(capabilities));
+ for (auto& observer : connection_observers_)
+ observer.CapabilitiesSet(capabilities);
}
void TestChromotingClient::SetPairingResponse(
@@ -236,8 +236,8 @@ void TestChromotingClient::SetPairingResponse(
<< "shared_secret: " << pairing_response.shared_secret()
<< ") Called";
- FOR_EACH_OBSERVER(RemoteConnectionObserver, connection_observers_,
- PairingResponseSet(pairing_response));
+ for (auto& observer : connection_observers_)
+ observer.PairingResponseSet(pairing_response);
}
void TestChromotingClient::DeliverHostMessage(
@@ -246,8 +246,8 @@ void TestChromotingClient::DeliverHostMessage(
<< "type: " << message.type() << ", "
<< "data: " << message.data() << ") Called";
- FOR_EACH_OBSERVER(RemoteConnectionObserver, connection_observers_,
- HostMessageReceived(message));
+ for (auto& observer : connection_observers_)
+ observer.HostMessageReceived(message);
}
void TestChromotingClient::SetDesktopSize(const webrtc::DesktopSize& size,
« no previous file with comments | « remoting/signaling/xmpp_signal_strategy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698