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

Unified Diff: remoting/host/register_support_host_request_unittest.cc

Issue 2415753002: Remove usage of base::ObserverList<T>::Iter::GetNext() in //remoting. (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 | remoting/signaling/delegating_signal_strategy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/register_support_host_request_unittest.cc
diff --git a/remoting/host/register_support_host_request_unittest.cc b/remoting/host/register_support_host_request_unittest.cc
index 9bcfb9dba656d088fb6243dd8fa368a7853803be..a467476c4742070658ebc7e2e885f7a49b57846d 100644
--- a/remoting/host/register_support_host_request_unittest.cc
+++ b/remoting/host/register_support_host_request_unittest.cc
@@ -153,11 +153,8 @@ TEST_F(RegisterSupportHostRequestTest, Send) {
result->AddElement(support_id_lifetime);
int consumed = 0;
- base::ObserverListBase<SignalStrategy::Listener>::Iterator it(
- &signal_strategy_listeners_);
- SignalStrategy::Listener* listener;
- while ((listener = it.GetNext()) != nullptr) {
- if (listener->OnSignalStrategyIncomingStanza(response.get()))
+ for (auto& listener : signal_strategy_listeners_) {
+ if (listener.OnSignalStrategyIncomingStanza(response.get()))
consumed++;
}
EXPECT_EQ(1, consumed);
« no previous file with comments | « no previous file | remoting/signaling/delegating_signal_strategy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698