| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/server_log_entry.h" | 10 #include "remoting/host/server_log_entry.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 LogToServer::~LogToServer() { | 30 LogToServer::~LogToServer() { |
| 31 } | 31 } |
| 32 | 32 |
| 33 void LogToServer::LogSessionStateChange(bool connected) { | 33 void LogToServer::LogSessionStateChange(bool connected) { |
| 34 scoped_ptr<ServerLogEntry> entry(ServerLogEntry::MakeSessionStateChange( | 34 scoped_ptr<ServerLogEntry> entry(ServerLogEntry::MakeSessionStateChange( |
| 35 connected)); | 35 connected)); |
| 36 entry->AddHostFields(); | 36 entry->AddHostFields(); |
| 37 Log(*entry.get()); | 37 Log(*entry.get()); |
| 38 } | 38 } |
| 39 | 39 |
| 40 void LogToServer::OnSignallingConnected(SignalStrategy* signal_strategy, | 40 void LogToServer::OnSignallingConnected(SignalStrategy* signal_strategy) { |
| 41 const std::string& full_jid) { | |
| 42 DCHECK(message_loop_->BelongsToCurrentThread()); | 41 DCHECK(message_loop_->BelongsToCurrentThread()); |
| 43 iq_sender_.reset(new IqSender(signal_strategy)); | 42 iq_sender_.reset(new IqSender(signal_strategy)); |
| 44 SendPendingEntries(); | 43 SendPendingEntries(); |
| 45 } | 44 } |
| 46 | 45 |
| 47 void LogToServer::OnSignallingDisconnected() { | 46 void LogToServer::OnSignallingDisconnected() { |
| 48 DCHECK(message_loop_->BelongsToCurrentThread()); | 47 DCHECK(message_loop_->BelongsToCurrentThread()); |
| 49 iq_sender_.reset(); | 48 iq_sender_.reset(); |
| 50 } | 49 } |
| 51 | 50 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 } | 87 } |
| 89 // Send the stanza to the server. | 88 // Send the stanza to the server. |
| 90 scoped_ptr<IqRequest> req(iq_sender_->SendIq( | 89 scoped_ptr<IqRequest> req(iq_sender_->SendIq( |
| 91 buzz::STR_SET, kChromotingBotJid, stanza.release(), | 90 buzz::STR_SET, kChromotingBotJid, stanza.release(), |
| 92 IqSender::ReplyCallback())); | 91 IqSender::ReplyCallback())); |
| 93 // We ignore any response, so let the IqRequest be destroyed. | 92 // We ignore any response, so let the IqRequest be destroyed. |
| 94 return; | 93 return; |
| 95 } | 94 } |
| 96 | 95 |
| 97 } // namespace remoting | 96 } // namespace remoting |
| OLD | NEW |