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