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

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

Issue 1152983004: Move ObserverList to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 QName(kChromotingXmlNamespace, "support-id")); 143 QName(kChromotingXmlNamespace, "support-id"));
144 support_id->AddText(kSupportId); 144 support_id->AddText(kSupportId);
145 result->AddElement(support_id); 145 result->AddElement(support_id);
146 146
147 XmlElement* support_id_lifetime = new XmlElement( 147 XmlElement* support_id_lifetime = new XmlElement(
148 QName(kChromotingXmlNamespace, "support-id-lifetime")); 148 QName(kChromotingXmlNamespace, "support-id-lifetime"));
149 support_id_lifetime->AddText(kSupportIdLifetime); 149 support_id_lifetime->AddText(kSupportIdLifetime);
150 result->AddElement(support_id_lifetime); 150 result->AddElement(support_id_lifetime);
151 151
152 int consumed = 0; 152 int consumed = 0;
153 ObserverListBase<SignalStrategy::Listener>::Iterator it( 153 base::ObserverListBase<SignalStrategy::Listener>::Iterator it(
154 &signal_strategy_listeners_); 154 &signal_strategy_listeners_);
155 SignalStrategy::Listener* listener; 155 SignalStrategy::Listener* listener;
156 while ((listener = it.GetNext()) != nullptr) { 156 while ((listener = it.GetNext()) != nullptr) {
157 if (listener->OnSignalStrategyIncomingStanza(response.get())) 157 if (listener->OnSignalStrategyIncomingStanza(response.get()))
158 consumed++; 158 consumed++;
159 } 159 }
160 EXPECT_EQ(1, consumed); 160 EXPECT_EQ(1, consumed);
161 161
162 base::RunLoop().RunUntilIdle(); 162 base::RunLoop().RunUntilIdle();
163 } 163 }
164 164
165 } // namespace remoting 165 } // 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