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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 const std::string& to_field = stanza_ptr->Attr(buzz::QN_TO); | 129 const std::string& to_field = stanza_ptr->Attr(buzz::QN_TO); |
130 if (to_field != jid_) { | 130 if (to_field != jid_) { |
131 LOG(WARNING) << "Dropping stanza that is addressed to " << to_field | 131 LOG(WARNING) << "Dropping stanza that is addressed to " << to_field |
132 << ". Local jid: " << jid_ | 132 << ". Local jid: " << jid_ |
133 << ". Message content: " << stanza_ptr->Str(); | 133 << ". Message content: " << stanza_ptr->Str(); |
134 return; | 134 return; |
135 } | 135 } |
136 | 136 |
137 ObserverListBase<Listener>::Iterator it(listeners_); | 137 ObserverListBase<Listener>::Iterator it(listeners_); |
138 Listener* listener; | 138 Listener* listener; |
139 while ((listener = it.GetNext()) != NULL) { | 139 while ((listener = it.GetNext()) != nullptr) { |
140 if (listener->OnSignalStrategyIncomingStanza(stanza_ptr)) | 140 if (listener->OnSignalStrategyIncomingStanza(stanza_ptr)) |
141 break; | 141 break; |
142 } | 142 } |
143 } | 143 } |
144 | 144 |
145 void FakeSignalStrategy::SetPeerCallback(const PeerCallback& peer_callback) { | 145 void FakeSignalStrategy::SetPeerCallback(const PeerCallback& peer_callback) { |
146 peer_callback_ = peer_callback; | 146 peer_callback_ = peer_callback; |
147 } | 147 } |
148 | 148 |
149 } // namespace remoting | 149 } // namespace remoting |
OLD | NEW |