| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/ipc_host_event_logger.h" | 5 #include "remoting/host/ipc_host_event_logger.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "ipc/ipc_sender.h" | 8 #include "ipc/ipc_sender.h" |
| 9 #include "net/base/ip_endpoint.h" | 9 #include "net/base/ip_endpoint.h" |
| 10 #include "remoting/host/chromoting_messages.h" | 10 #include "remoting/host/chromoting_messages.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 } | 53 } |
| 54 | 54 |
| 55 void IpcHostEventLogger::OnClientRouteChange( | 55 void IpcHostEventLogger::OnClientRouteChange( |
| 56 const std::string& jid, | 56 const std::string& jid, |
| 57 const std::string& channel_name, | 57 const std::string& channel_name, |
| 58 const protocol::TransportRoute& route) { | 58 const protocol::TransportRoute& route) { |
| 59 DCHECK(CalledOnValidThread()); | 59 DCHECK(CalledOnValidThread()); |
| 60 | 60 |
| 61 SerializedTransportRoute serialized_route; | 61 SerializedTransportRoute serialized_route; |
| 62 serialized_route.type = route.type; | 62 serialized_route.type = route.type; |
| 63 serialized_route.remote_address = route.remote_address; | 63 serialized_route.remote_ip = route.remote_address.address().bytes(); |
| 64 serialized_route.local_address = route.local_address; | 64 serialized_route.remote_port = route.remote_address.port(); |
| 65 | 65 serialized_route.local_ip = route.local_address.address().bytes(); |
| 66 serialized_route.local_port = route.local_address.port(); |
| 66 daemon_channel_->Send(new ChromotingNetworkDaemonMsg_ClientRouteChange( | 67 daemon_channel_->Send(new ChromotingNetworkDaemonMsg_ClientRouteChange( |
| 67 jid, channel_name, serialized_route)); | 68 jid, channel_name, serialized_route)); |
| 68 } | 69 } |
| 69 | 70 |
| 70 void IpcHostEventLogger::OnShutdown() { | 71 void IpcHostEventLogger::OnShutdown() { |
| 71 DCHECK(CalledOnValidThread()); | 72 DCHECK(CalledOnValidThread()); |
| 72 | 73 |
| 73 daemon_channel_->Send(new ChromotingNetworkDaemonMsg_HostShutdown()); | 74 daemon_channel_->Send(new ChromotingNetworkDaemonMsg_HostShutdown()); |
| 74 } | 75 } |
| 75 | 76 |
| 76 void IpcHostEventLogger::OnStart(const std::string& xmpp_login) { | 77 void IpcHostEventLogger::OnStart(const std::string& xmpp_login) { |
| 77 DCHECK(CalledOnValidThread()); | 78 DCHECK(CalledOnValidThread()); |
| 78 | 79 |
| 79 daemon_channel_->Send(new ChromotingNetworkDaemonMsg_HostStarted(xmpp_login)); | 80 daemon_channel_->Send(new ChromotingNetworkDaemonMsg_HostStarted(xmpp_login)); |
| 80 } | 81 } |
| 81 | 82 |
| 82 } // namespace remoting | 83 } // namespace remoting |
| OLD | NEW |