OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/signaling/xmpp_signal_strategy.h" | 5 #include "remoting/signaling/xmpp_signal_strategy.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 DCHECK(thread_checker_.CalledOnValidThread()); | 297 DCHECK(thread_checker_.CalledOnValidThread()); |
298 | 298 |
299 error_ = error; | 299 error_ = error; |
300 Disconnect(); | 300 Disconnect(); |
301 } | 301 } |
302 | 302 |
303 void XmppSignalStrategy::Core::OnStanza( | 303 void XmppSignalStrategy::Core::OnStanza( |
304 const scoped_ptr<buzz::XmlElement> stanza) { | 304 const scoped_ptr<buzz::XmlElement> stanza) { |
305 DCHECK(thread_checker_.CalledOnValidThread()); | 305 DCHECK(thread_checker_.CalledOnValidThread()); |
306 | 306 |
307 ObserverListBase<Listener>::Iterator it(&listeners_); | 307 base::ObserverListBase<Listener>::Iterator it(&listeners_); |
308 for (Listener* listener = it.GetNext(); listener; listener = it.GetNext()) { | 308 for (Listener* listener = it.GetNext(); listener; listener = it.GetNext()) { |
309 if (listener->OnSignalStrategyIncomingStanza(stanza.get())) | 309 if (listener->OnSignalStrategyIncomingStanza(stanza.get())) |
310 return; | 310 return; |
311 } | 311 } |
312 } | 312 } |
313 | 313 |
314 void XmppSignalStrategy::Core::OnParserError() { | 314 void XmppSignalStrategy::Core::OnParserError() { |
315 DCHECK(thread_checker_.CalledOnValidThread()); | 315 DCHECK(thread_checker_.CalledOnValidThread()); |
316 | 316 |
317 error_ = NETWORK_ERROR; | 317 error_ = NETWORK_ERROR; |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 std::string XmppSignalStrategy::GetNextId() { | 490 std::string XmppSignalStrategy::GetNextId() { |
491 return base::Uint64ToString(base::RandUint64()); | 491 return base::Uint64ToString(base::RandUint64()); |
492 } | 492 } |
493 | 493 |
494 void XmppSignalStrategy::SetAuthInfo(const std::string& username, | 494 void XmppSignalStrategy::SetAuthInfo(const std::string& username, |
495 const std::string& auth_token) { | 495 const std::string& auth_token) { |
496 core_->SetAuthInfo(username, auth_token); | 496 core_->SetAuthInfo(username, auth_token); |
497 } | 497 } |
498 | 498 |
499 } // namespace remoting | 499 } // namespace remoting |
OLD | NEW |