| 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 IPC_END_MESSAGE_MAP() | 119 IPC_END_MESSAGE_MAP() |
| 120 | 120 |
| 121 if (!handled) { | 121 if (!handled) { |
| 122 LOG(ERROR) << "Received unexpected IPC type: " << message.type(); | 122 LOG(ERROR) << "Received unexpected IPC type: " << message.type(); |
| 123 CrashNetworkProcess(FROM_HERE); | 123 CrashNetworkProcess(FROM_HERE); |
| 124 } | 124 } |
| 125 | 125 |
| 126 return handled; | 126 return handled; |
| 127 } | 127 } |
| 128 | 128 |
| 129 void DaemonProcess::OnPermanentError() { | 129 void DaemonProcess::OnPermanentError(int exit_code) { |
| 130 DCHECK(caller_task_runner()->BelongsToCurrentThread()); | 130 DCHECK(caller_task_runner()->BelongsToCurrentThread()); |
| 131 Stop(); | 131 Stop(); |
| 132 } | 132 } |
| 133 | 133 |
| 134 void DaemonProcess::CloseDesktopSession(int terminal_id) { | 134 void DaemonProcess::CloseDesktopSession(int terminal_id) { |
| 135 DCHECK(caller_task_runner()->BelongsToCurrentThread()); | 135 DCHECK(caller_task_runner()->BelongsToCurrentThread()); |
| 136 | 136 |
| 137 // Validate the supplied terminal ID. An attempt to use a desktop session ID | 137 // Validate the supplied terminal ID. An attempt to use a desktop session ID |
| 138 // that couldn't possibly have been allocated is considered a protocol error | 138 // that couldn't possibly have been allocated is considered a protocol error |
| 139 // and the network process will be restarted. | 139 // and the network process will be restarted. |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 } | 368 } |
| 369 | 369 |
| 370 void DaemonProcess::DeleteAllDesktopSessions() { | 370 void DaemonProcess::DeleteAllDesktopSessions() { |
| 371 while (!desktop_sessions_.empty()) { | 371 while (!desktop_sessions_.empty()) { |
| 372 delete desktop_sessions_.front(); | 372 delete desktop_sessions_.front(); |
| 373 desktop_sessions_.pop_front(); | 373 desktop_sessions_.pop_front(); |
| 374 } | 374 } |
| 375 } | 375 } |
| 376 | 376 |
| 377 } // namespace remoting | 377 } // namespace remoting |
| OLD | NEW |