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

Side by Side Diff: remoting/host/register_support_host_request_unittest.cc

Issue 982413002: base: Stop passing a non-const ref to ObserverListBase::Iterator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: observerref: fixwindowsbuild Created 5 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/host/register_support_host_request.h" 5 #include "remoting/host/register_support_host_request.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 support_id->AddText(kSupportId); 143 support_id->AddText(kSupportId);
144 result->AddElement(support_id); 144 result->AddElement(support_id);
145 145
146 XmlElement* support_id_lifetime = new XmlElement( 146 XmlElement* support_id_lifetime = new XmlElement(
147 QName(kChromotingXmlNamespace, "support-id-lifetime")); 147 QName(kChromotingXmlNamespace, "support-id-lifetime"));
148 support_id_lifetime->AddText(kSupportIdLifetime); 148 support_id_lifetime->AddText(kSupportIdLifetime);
149 result->AddElement(support_id_lifetime); 149 result->AddElement(support_id_lifetime);
150 150
151 int consumed = 0; 151 int consumed = 0;
152 ObserverListBase<SignalStrategy::Listener>::Iterator it( 152 ObserverListBase<SignalStrategy::Listener>::Iterator it(
153 signal_strategy_listeners_); 153 &signal_strategy_listeners_);
154 SignalStrategy::Listener* listener; 154 SignalStrategy::Listener* listener;
155 while ((listener = it.GetNext()) != nullptr) { 155 while ((listener = it.GetNext()) != nullptr) {
156 if (listener->OnSignalStrategyIncomingStanza(response.get())) 156 if (listener->OnSignalStrategyIncomingStanza(response.get()))
157 consumed++; 157 consumed++;
158 } 158 }
159 EXPECT_EQ(1, consumed); 159 EXPECT_EQ(1, consumed);
160 160
161 base::RunLoop().RunUntilIdle(); 161 base::RunLoop().RunUntilIdle();
162 } 162 }
163 163
164 } // namespace remoting 164 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/plugin/delegating_signal_strategy.cc ('k') | remoting/signaling/fake_signal_strategy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698