OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/host/log_to_server.h" | 5 #include "remoting/host/log_to_server.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop_proxy.h" | 8 #include "base/message_loop_proxy.h" |
9 #include "remoting/base/constants.h" | 9 #include "remoting/base/constants.h" |
10 #include "remoting/host/chromoting_host.h" | 10 #include "remoting/host/chromoting_host.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 DCHECK(CalledOnValidThread()); | 59 DCHECK(CalledOnValidThread()); |
60 | 60 |
61 if (state == SignalStrategy::CONNECTED) { | 61 if (state == SignalStrategy::CONNECTED) { |
62 iq_sender_.reset(new IqSender(signal_strategy_)); | 62 iq_sender_.reset(new IqSender(signal_strategy_)); |
63 SendPendingEntries(); | 63 SendPendingEntries(); |
64 } else if (state == SignalStrategy::DISCONNECTED) { | 64 } else if (state == SignalStrategy::DISCONNECTED) { |
65 iq_sender_.reset(); | 65 iq_sender_.reset(); |
66 } | 66 } |
67 } | 67 } |
68 | 68 |
| 69 bool LogToServer::OnSignalStrategyIncomingStanza( |
| 70 const buzz::XmlElement* stanza) { |
| 71 return false; |
| 72 } |
| 73 |
69 void LogToServer::OnClientConnected(const std::string& jid) { | 74 void LogToServer::OnClientConnected(const std::string& jid) { |
70 DCHECK(CalledOnValidThread()); | 75 DCHECK(CalledOnValidThread()); |
71 LogSessionStateChange(jid, true); | 76 LogSessionStateChange(jid, true); |
72 } | 77 } |
73 | 78 |
74 void LogToServer::OnClientDisconnected(const std::string& jid) { | 79 void LogToServer::OnClientDisconnected(const std::string& jid) { |
75 DCHECK(CalledOnValidThread()); | 80 DCHECK(CalledOnValidThread()); |
76 LogSessionStateChange(jid, false); | 81 LogSessionStateChange(jid, false); |
77 connection_route_type_.erase(jid); | 82 connection_route_type_.erase(jid); |
78 } | 83 } |
(...skipping 29 matching lines...) Expand all Loading... |
108 } | 113 } |
109 // Send the stanza to the server. | 114 // Send the stanza to the server. |
110 scoped_ptr<IqRequest> req = iq_sender_->SendIq( | 115 scoped_ptr<IqRequest> req = iq_sender_->SendIq( |
111 buzz::STR_SET, kChromotingBotJid, stanza.Pass(), | 116 buzz::STR_SET, kChromotingBotJid, stanza.Pass(), |
112 IqSender::ReplyCallback()); | 117 IqSender::ReplyCallback()); |
113 // We ignore any response, so let the IqRequest be destroyed. | 118 // We ignore any response, so let the IqRequest be destroyed. |
114 return; | 119 return; |
115 } | 120 } |
116 | 121 |
117 } // namespace remoting | 122 } // namespace remoting |
OLD | NEW |