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

Side by Side Diff: remoting/signaling/xmpp_signal_strategy.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 unified diff | Download patch
« no previous file with comments | « remoting/signaling/fake_signal_strategy.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 359
360 void XmppSignalStrategy::Core::OnStanza( 360 void XmppSignalStrategy::Core::OnStanza(
361 const std::unique_ptr<buzz::XmlElement> stanza) { 361 const std::unique_ptr<buzz::XmlElement> stanza) {
362 DCHECK(thread_checker_.CalledOnValidThread()); 362 DCHECK(thread_checker_.CalledOnValidThread());
363 363
364 364
365 HOST_DLOG << "Received incoming stanza:\n" 365 HOST_DLOG << "Received incoming stanza:\n"
366 << stanza->Str() 366 << stanza->Str()
367 << "\n========================================================="; 367 << "\n=========================================================";
368 368
369 base::ObserverListBase<Listener>::Iterator it(&listeners_); 369 for (auto& listener : listeners_) {
370 for (Listener* listener = it.GetNext(); listener; listener = it.GetNext()) { 370 if (listener.OnSignalStrategyIncomingStanza(stanza.get()))
371 if (listener->OnSignalStrategyIncomingStanza(stanza.get()))
372 return; 371 return;
373 } 372 }
374 } 373 }
375 374
376 void XmppSignalStrategy::Core::OnParserError() { 375 void XmppSignalStrategy::Core::OnParserError() {
377 DCHECK(thread_checker_.CalledOnValidThread()); 376 DCHECK(thread_checker_.CalledOnValidThread());
378 377
379 error_ = NETWORK_ERROR; 378 error_ = NETWORK_ERROR;
380 Disconnect(); 379 Disconnect();
381 } 380 }
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 std::string XmppSignalStrategy::GetNextId() { 550 std::string XmppSignalStrategy::GetNextId() {
552 return base::Uint64ToString(base::RandUint64()); 551 return base::Uint64ToString(base::RandUint64());
553 } 552 }
554 553
555 void XmppSignalStrategy::SetAuthInfo(const std::string& username, 554 void XmppSignalStrategy::SetAuthInfo(const std::string& username,
556 const std::string& auth_token) { 555 const std::string& auth_token) {
557 core_->SetAuthInfo(username, auth_token); 556 core_->SetAuthInfo(username, auth_token);
558 } 557 }
559 558
560 } // namespace remoting 559 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/signaling/fake_signal_strategy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698