| 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/desktop_session_win.h" | 5 #include "remoting/host/desktop_session_win.h" |
| 6 | 6 |
| 7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "ipc/ipc_message_macros.h" | 10 #include "ipc/ipc_message_macros.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 75 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
| 76 | 76 |
| 77 bool handled = true; | 77 bool handled = true; |
| 78 IPC_BEGIN_MESSAGE_MAP(DesktopSessionWin, message) | 78 IPC_BEGIN_MESSAGE_MAP(DesktopSessionWin, message) |
| 79 IPC_MESSAGE_HANDLER(ChromotingDesktopDaemonMsg_DesktopAttached, | 79 IPC_MESSAGE_HANDLER(ChromotingDesktopDaemonMsg_DesktopAttached, |
| 80 OnDesktopSessionAgentAttached) | 80 OnDesktopSessionAgentAttached) |
| 81 IPC_MESSAGE_HANDLER(ChromotingDesktopDaemonMsg_InjectSas, | 81 IPC_MESSAGE_HANDLER(ChromotingDesktopDaemonMsg_InjectSas, |
| 82 OnInjectSas) | 82 OnInjectSas) |
| 83 IPC_MESSAGE_UNHANDLED(handled = false) | 83 IPC_MESSAGE_UNHANDLED(handled = false) |
| 84 IPC_END_MESSAGE_MAP() | 84 IPC_END_MESSAGE_MAP() |
| 85 |
| 86 if (!handled) { |
| 87 LOG(ERROR) << "Received unexpected IPC type: " << message.type(); |
| 88 RestartDesktopProcess(FROM_HERE); |
| 89 } |
| 90 |
| 85 return handled; | 91 return handled; |
| 86 } | 92 } |
| 87 | 93 |
| 88 void DesktopSessionWin::OnPermanentError() { | 94 void DesktopSessionWin::OnPermanentError() { |
| 89 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 95 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
| 90 | 96 |
| 91 launcher_.reset(); | 97 launcher_.reset(); |
| 92 | 98 |
| 93 // This call will delete |this| so it should be at the very end of the method. | 99 // This call will delete |this| so it should be at the very end of the method. |
| 94 daemon_process()->CloseDesktopSession(id()); | 100 daemon_process()->CloseDesktopSession(id()); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 | 160 |
| 155 void DesktopSessionWin::RestartDesktopProcess( | 161 void DesktopSessionWin::RestartDesktopProcess( |
| 156 const tracked_objects::Location& location) { | 162 const tracked_objects::Location& location) { |
| 157 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 163 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
| 158 | 164 |
| 159 launcher_->Send(new ChromotingDaemonDesktopMsg_Crash( | 165 launcher_->Send(new ChromotingDaemonDesktopMsg_Crash( |
| 160 location.function_name(), location.file_name(), location.line_number())); | 166 location.function_name(), location.file_name(), location.line_number())); |
| 161 } | 167 } |
| 162 | 168 |
| 163 } // namespace remoting | 169 } // namespace remoting |
| OLD | NEW |