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

Side by Side Diff: remoting/signaling/fake_signal_strategy.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 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/fake_signal_strategy.h" 5 #include "remoting/signaling/fake_signal_strategy.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 received_messages_.push_back(stanza.release()); 133 received_messages_.push_back(stanza.release());
134 134
135 const std::string& to_field = stanza_ptr->Attr(buzz::QN_TO); 135 const std::string& to_field = stanza_ptr->Attr(buzz::QN_TO);
136 if (to_field != jid_) { 136 if (to_field != jid_) {
137 LOG(WARNING) << "Dropping stanza that is addressed to " << to_field 137 LOG(WARNING) << "Dropping stanza that is addressed to " << to_field
138 << ". Local jid: " << jid_ 138 << ". Local jid: " << jid_
139 << ". Message content: " << stanza_ptr->Str(); 139 << ". Message content: " << stanza_ptr->Str();
140 return; 140 return;
141 } 141 }
142 142
143 ObserverListBase<Listener>::Iterator it(&listeners_); 143 base::ObserverListBase<Listener>::Iterator it(&listeners_);
144 Listener* listener; 144 Listener* listener;
145 while ((listener = it.GetNext()) != nullptr) { 145 while ((listener = it.GetNext()) != nullptr) {
146 if (listener->OnSignalStrategyIncomingStanza(stanza_ptr)) 146 if (listener->OnSignalStrategyIncomingStanza(stanza_ptr))
147 break; 147 break;
148 } 148 }
149 } 149 }
150 150
151 void FakeSignalStrategy::SetPeerCallback(const PeerCallback& peer_callback) { 151 void FakeSignalStrategy::SetPeerCallback(const PeerCallback& peer_callback) {
152 peer_callback_ = peer_callback; 152 peer_callback_ = peer_callback;
153 } 153 }
154 154
155 } // namespace remoting 155 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/register_support_host_request_unittest.cc ('k') | remoting/signaling/xmpp_signal_strategy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698