| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |