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/daemon_process.h" | 5 #include "remoting/host/daemon_process.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 IPC_MESSAGE_HANDLER(ChromotingNetworkDaemonMsg_ClientDisconnected, | 91 IPC_MESSAGE_HANDLER(ChromotingNetworkDaemonMsg_ClientDisconnected, |
92 OnClientDisconnected) | 92 OnClientDisconnected) |
93 IPC_MESSAGE_HANDLER(ChromotingNetworkDaemonMsg_ClientRouteChange, | 93 IPC_MESSAGE_HANDLER(ChromotingNetworkDaemonMsg_ClientRouteChange, |
94 OnClientRouteChange) | 94 OnClientRouteChange) |
95 IPC_MESSAGE_HANDLER(ChromotingNetworkDaemonMsg_HostStarted, | 95 IPC_MESSAGE_HANDLER(ChromotingNetworkDaemonMsg_HostStarted, |
96 OnHostStarted) | 96 OnHostStarted) |
97 IPC_MESSAGE_HANDLER(ChromotingNetworkDaemonMsg_HostShutdown, | 97 IPC_MESSAGE_HANDLER(ChromotingNetworkDaemonMsg_HostShutdown, |
98 OnHostShutdown) | 98 OnHostShutdown) |
99 IPC_MESSAGE_UNHANDLED(handled = false) | 99 IPC_MESSAGE_UNHANDLED(handled = false) |
100 IPC_END_MESSAGE_MAP() | 100 IPC_END_MESSAGE_MAP() |
| 101 |
| 102 if (!handled) { |
| 103 LOG(ERROR) << "Received unexpected IPC type: " << message.type(); |
| 104 CrashNetworkProcess(FROM_HERE); |
| 105 } |
| 106 |
101 return handled; | 107 return handled; |
102 } | 108 } |
103 | 109 |
104 void DaemonProcess::OnPermanentError() { | 110 void DaemonProcess::OnPermanentError() { |
105 DCHECK(caller_task_runner()->BelongsToCurrentThread()); | 111 DCHECK(caller_task_runner()->BelongsToCurrentThread()); |
106 Stop(); | 112 Stop(); |
107 } | 113 } |
108 | 114 |
109 void DaemonProcess::CloseDesktopSession(int terminal_id) { | 115 void DaemonProcess::CloseDesktopSession(int terminal_id) { |
110 DCHECK(caller_task_runner()->BelongsToCurrentThread()); | 116 DCHECK(caller_task_runner()->BelongsToCurrentThread()); |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 } | 302 } |
297 | 303 |
298 void DaemonProcess::DeleteAllDesktopSessions() { | 304 void DaemonProcess::DeleteAllDesktopSessions() { |
299 while (!desktop_sessions_.empty()) { | 305 while (!desktop_sessions_.empty()) { |
300 delete desktop_sessions_.front(); | 306 delete desktop_sessions_.front(); |
301 desktop_sessions_.pop_front(); | 307 desktop_sessions_.pop_front(); |
302 } | 308 } |
303 } | 309 } |
304 | 310 |
305 } // namespace remoting | 311 } // namespace remoting |
OLD | NEW |