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 27 matching lines...) Expand all Loading... |
38 LogToServer::~LogToServer() { | 38 LogToServer::~LogToServer() { |
39 signal_strategy_->RemoveListener(this); | 39 signal_strategy_->RemoveListener(this); |
40 if (host_) | 40 if (host_) |
41 host_->RemoveStatusObserver(this); | 41 host_->RemoveStatusObserver(this); |
42 } | 42 } |
43 | 43 |
44 void LogToServer::LogSessionStateChange(bool connected) { | 44 void LogToServer::LogSessionStateChange(bool connected) { |
45 DCHECK(CalledOnValidThread()); | 45 DCHECK(CalledOnValidThread()); |
46 | 46 |
47 scoped_ptr<ServerLogEntry> entry( | 47 scoped_ptr<ServerLogEntry> entry( |
48 ServerLogEntry::MakeSessionStateChange(connected)); | 48 ServerLogEntry::MakeForSessionStateChange(connected)); |
49 entry->AddHostFields(); | 49 entry->AddHostFields(); |
50 entry->AddModeField(mode_); | 50 entry->AddModeField(mode_); |
51 | 51 |
52 if (connected) { | 52 if (connected) { |
53 DCHECK(connection_type_set_); | 53 DCHECK(connection_type_set_); |
54 entry->AddConnectionTypeField(connection_type_); | 54 entry->AddConnectionTypeField(connection_type_); |
55 } | 55 } |
56 Log(*entry.get()); | 56 Log(*entry.get()); |
57 } | 57 } |
58 | 58 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 } | 116 } |
117 // Send the stanza to the server. | 117 // Send the stanza to the server. |
118 scoped_ptr<IqRequest> req = iq_sender_->SendIq( | 118 scoped_ptr<IqRequest> req = iq_sender_->SendIq( |
119 buzz::STR_SET, kChromotingBotJid, stanza.Pass(), | 119 buzz::STR_SET, kChromotingBotJid, stanza.Pass(), |
120 IqSender::ReplyCallback()); | 120 IqSender::ReplyCallback()); |
121 // We ignore any response, so let the IqRequest be destroyed. | 121 // We ignore any response, so let the IqRequest be destroyed. |
122 return; | 122 return; |
123 } | 123 } |
124 | 124 |
125 } // namespace remoting | 125 } // namespace remoting |
OLD | NEW |