| 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 // This file implements the Windows service controlling Me2Me host processes | 5 // This file implements the Windows service controlling Me2Me host processes |
| 6 // running within user sessions. | 6 // running within user sessions. |
| 7 | 7 |
| 8 #include "remoting/host/desktop_process.h" | 8 #include "remoting/host/desktop_process.h" |
| 9 | 9 |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 | 84 |
| 85 bool DesktopProcess::OnMessageReceived(const IPC::Message& message) { | 85 bool DesktopProcess::OnMessageReceived(const IPC::Message& message) { |
| 86 DCHECK(caller_task_runner_->BelongsToCurrentThread()); | 86 DCHECK(caller_task_runner_->BelongsToCurrentThread()); |
| 87 | 87 |
| 88 bool handled = true; | 88 bool handled = true; |
| 89 IPC_BEGIN_MESSAGE_MAP(DesktopProcess, message) | 89 IPC_BEGIN_MESSAGE_MAP(DesktopProcess, message) |
| 90 IPC_MESSAGE_HANDLER(ChromotingDaemonMsg_Crash, OnCrash) | 90 IPC_MESSAGE_HANDLER(ChromotingDaemonMsg_Crash, OnCrash) |
| 91 IPC_MESSAGE_UNHANDLED(handled = false) | 91 IPC_MESSAGE_UNHANDLED(handled = false) |
| 92 IPC_END_MESSAGE_MAP() | 92 IPC_END_MESSAGE_MAP() |
| 93 | 93 |
| 94 CHECK(handled) << "Received unexpected IPC type: " << message.type(); | 94 // Received unexpected IPC type. |
| 95 CHECK(handled); |
| 95 return handled; | 96 return handled; |
| 96 } | 97 } |
| 97 | 98 |
| 98 void DesktopProcess::OnChannelConnected(int32_t peer_pid) { | 99 void DesktopProcess::OnChannelConnected(int32_t peer_pid) { |
| 99 DCHECK(caller_task_runner_->BelongsToCurrentThread()); | 100 DCHECK(caller_task_runner_->BelongsToCurrentThread()); |
| 100 | 101 |
| 101 VLOG(1) << "IPC: desktop <- daemon (" << peer_pid << ")"; | 102 VLOG(1) << "IPC: desktop <- daemon (" << peer_pid << ")"; |
| 102 } | 103 } |
| 103 | 104 |
| 104 void DesktopProcess::OnChannelError() { | 105 void DesktopProcess::OnChannelError() { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 void DesktopProcess::OnCrash(const std::string& function_name, | 163 void DesktopProcess::OnCrash(const std::string& function_name, |
| 163 const std::string& file_name, | 164 const std::string& file_name, |
| 164 const int& line_number) { | 165 const int& line_number) { |
| 165 char message[1024]; | 166 char message[1024]; |
| 166 base::snprintf(message, sizeof(message), | 167 base::snprintf(message, sizeof(message), |
| 167 "Requested by %s at %s, line %d.", | 168 "Requested by %s at %s, line %d.", |
| 168 function_name.c_str(), file_name.c_str(), line_number); | 169 function_name.c_str(), file_name.c_str(), line_number); |
| 169 base::debug::Alias(message); | 170 base::debug::Alias(message); |
| 170 | 171 |
| 171 // The daemon requested us to crash the process. | 172 // The daemon requested us to crash the process. |
| 172 CHECK(false) << message; | 173 LOG(FATAL) << message; |
| 173 } | 174 } |
| 174 | 175 |
| 175 } // namespace remoting | 176 } // namespace remoting |
| OLD | NEW |