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

Unified Diff: ipc/ipc_test_sink.cc

Issue 2412483008: Remove usage of base::ObserverList<T>::Iter::GetNext() in //ipc. (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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_test_sink.cc
diff --git a/ipc/ipc_test_sink.cc b/ipc/ipc_test_sink.cc
index 316609c3386d762a3ae6bd17cc1491073e7ae7b4..4dd4a447731eef7b50fcca43788e7a1dd6ae12af 100644
--- a/ipc/ipc_test_sink.cc
+++ b/ipc/ipc_test_sink.cc
@@ -45,10 +45,8 @@ base::ProcessId TestSink::GetSelfPID() const {
}
bool TestSink::OnMessageReceived(const Message& msg) {
- base::ObserverListBase<Listener>::Iterator it(&filter_list_);
- Listener* observer;
- while ((observer = it.GetNext()) != NULL) {
- if (observer->OnMessageReceived(msg))
+ for (auto& observer : filter_list_) {
+ if (observer.OnMessageReceived(msg))
return true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698