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 "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 IPC::PlatformFileForTransit desktop_pipe; | 132 IPC::PlatformFileForTransit desktop_pipe; |
133 if (!desktop_agent_->Start(AsWeakPtr(), &desktop_pipe)) { | 133 if (!desktop_agent_->Start(AsWeakPtr(), &desktop_pipe)) { |
134 desktop_agent_ = nullptr; | 134 desktop_agent_ = nullptr; |
135 caller_task_runner_ = nullptr; | 135 caller_task_runner_ = nullptr; |
136 input_task_runner_ = nullptr; | 136 input_task_runner_ = nullptr; |
137 desktop_environment_factory_.reset(); | 137 desktop_environment_factory_.reset(); |
138 return false; | 138 return false; |
139 } | 139 } |
140 | 140 |
141 // Connect to the daemon. | 141 // Connect to the daemon. |
142 daemon_channel_ = IPC::ChannelProxy::Create(daemon_channel_name_, | 142 daemon_channel_ = |
143 IPC::Channel::MODE_CLIENT, | 143 IPC::ChannelProxy::Create(daemon_channel_name_, IPC::Channel::MODE_CLIENT, |
144 this, | 144 this, io_task_runner.get()); |
145 io_task_runner.get(), | |
146 nullptr); | |
147 | 145 |
148 // Pass |desktop_pipe| to the daemon. | 146 // Pass |desktop_pipe| to the daemon. |
149 daemon_channel_->Send( | 147 daemon_channel_->Send( |
150 new ChromotingDesktopDaemonMsg_DesktopAttached(desktop_pipe)); | 148 new ChromotingDesktopDaemonMsg_DesktopAttached(desktop_pipe)); |
151 | 149 |
152 return true; | 150 return true; |
153 } | 151 } |
154 | 152 |
155 void DesktopProcess::OnCrash(const std::string& function_name, | 153 void DesktopProcess::OnCrash(const std::string& function_name, |
156 const std::string& file_name, | 154 const std::string& file_name, |
157 const int& line_number) { | 155 const int& line_number) { |
158 char message[1024]; | 156 char message[1024]; |
159 base::snprintf(message, sizeof(message), | 157 base::snprintf(message, sizeof(message), |
160 "Requested by %s at %s, line %d.", | 158 "Requested by %s at %s, line %d.", |
161 function_name.c_str(), file_name.c_str(), line_number); | 159 function_name.c_str(), file_name.c_str(), line_number); |
162 base::debug::Alias(message); | 160 base::debug::Alias(message); |
163 | 161 |
164 // The daemon requested us to crash the process. | 162 // The daemon requested us to crash the process. |
165 CHECK(false) << message; | 163 CHECK(false) << message; |
166 } | 164 } |
167 | 165 |
168 } // namespace remoting | 166 } // namespace remoting |
OLD | NEW |