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; |
} |