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

Unified Diff: blimp/client/core/session/connection_status.cc

Issue 2425493002: Remove usage of FOR_EACH_OBSERVER macro in blimp (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 | « blimp/client/core/contents/blimp_contents_impl.cc ('k') | blimp/engine/app/settings_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/client/core/session/connection_status.cc
diff --git a/blimp/client/core/session/connection_status.cc b/blimp/client/core/session/connection_status.cc
index 95393201a9842f51f007d4c56c76faaa52151349..069dcbb684a10e622d5b755aed10fcb851225147 100644
--- a/blimp/client/core/session/connection_status.cc
+++ b/blimp/client/core/session/connection_status.cc
@@ -36,14 +36,15 @@ base::WeakPtr<ConnectionStatus> ConnectionStatus::GetWeakPtr() {
void ConnectionStatus::OnConnected() {
is_connected_ = true;
UMA_HISTOGRAM_BOOLEAN("Blimp.Connected", true);
- FOR_EACH_OBSERVER(NetworkEventObserver, connection_observers_, OnConnected());
+ for (auto& observer : connection_observers_)
+ observer.OnConnected();
}
void ConnectionStatus::OnDisconnected(int result) {
is_connected_ = false;
UMA_HISTOGRAM_BOOLEAN("Blimp.Connected", false);
- FOR_EACH_OBSERVER(NetworkEventObserver, connection_observers_,
- OnDisconnected(result));
+ for (auto& observer : connection_observers_)
+ observer.OnDisconnected(result);
}
} // namespace client
« no previous file with comments | « blimp/client/core/contents/blimp_contents_impl.cc ('k') | blimp/engine/app/settings_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698