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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 void LogToServer::OnClientAuthenticated(const std::string& jid) { | 64 void LogToServer::OnClientAuthenticated(const std::string& jid) { |
65 DCHECK(CalledOnValidThread()); | 65 DCHECK(CalledOnValidThread()); |
66 LogSessionStateChange(true); | 66 LogSessionStateChange(true); |
67 } | 67 } |
68 | 68 |
69 void LogToServer::OnClientDisconnected(const std::string& jid) { | 69 void LogToServer::OnClientDisconnected(const std::string& jid) { |
70 DCHECK(CalledOnValidThread()); | 70 DCHECK(CalledOnValidThread()); |
71 LogSessionStateChange(false); | 71 LogSessionStateChange(false); |
72 } | 72 } |
73 | 73 |
74 void LogToServer::OnAccessDenied() { | 74 void LogToServer::OnAccessDenied(const std::string& jid) { |
75 } | 75 } |
76 | 76 |
77 void LogToServer::OnShutdown() { | 77 void LogToServer::OnShutdown() { |
78 } | 78 } |
79 | 79 |
80 void LogToServer::Log(const ServerLogEntry& entry) { | 80 void LogToServer::Log(const ServerLogEntry& entry) { |
81 pending_entries_.push_back(entry); | 81 pending_entries_.push_back(entry); |
82 SendPendingEntries(); | 82 SendPendingEntries(); |
83 } | 83 } |
84 | 84 |
(...skipping 14 matching lines...) Expand all Loading... |
99 } | 99 } |
100 // Send the stanza to the server. | 100 // Send the stanza to the server. |
101 scoped_ptr<IqRequest> req(iq_sender_->SendIq( | 101 scoped_ptr<IqRequest> req(iq_sender_->SendIq( |
102 buzz::STR_SET, kChromotingBotJid, stanza.release(), | 102 buzz::STR_SET, kChromotingBotJid, stanza.release(), |
103 IqSender::ReplyCallback())); | 103 IqSender::ReplyCallback())); |
104 // We ignore any response, so let the IqRequest be destroyed. | 104 // We ignore any response, so let the IqRequest be destroyed. |
105 return; | 105 return; |
106 } | 106 } |
107 | 107 |
108 } // namespace remoting | 108 } // namespace remoting |
OLD | NEW |