| OLD | NEW |
| 1 | 1 |
| 2 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
| 4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
| 5 // | 5 // |
| 6 // This file implements the Windows service controlling Me2Me host processes | 6 // This file implements the Windows service controlling Me2Me host processes |
| 7 // running within user sessions. | 7 // running within user sessions. |
| 8 | 8 |
| 9 #include "remoting/host/win/unprivileged_process_delegate.h" | 9 #include "remoting/host/win/unprivileged_process_delegate.h" |
| 10 | 10 |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 ScopedHandle worker_process; | 304 ScopedHandle worker_process; |
| 305 ScopedHandle worker_thread; | 305 ScopedHandle worker_thread; |
| 306 if (!LaunchProcessWithToken( | 306 if (!LaunchProcessWithToken( |
| 307 command_line.GetProgram(), command_line.GetCommandLineString(), | 307 command_line.GetProgram(), command_line.GetCommandLineString(), |
| 308 token.Get(), &process_attributes, &thread_attributes, | 308 token.Get(), &process_attributes, &thread_attributes, |
| 309 handles_to_inherit, /* creation_flags= */ 0, | 309 handles_to_inherit, /* creation_flags= */ 0, |
| 310 /* thread_attributes= */ nullptr, &worker_process, &worker_thread)) { | 310 /* thread_attributes= */ nullptr, &worker_process, &worker_thread)) { |
| 311 ReportFatalError(); | 311 ReportFatalError(); |
| 312 return; | 312 return; |
| 313 } | 313 } |
| 314 process.Connect(worker_process.Get(), mojo_channel.PassServerHandle()); | 314 process.Connect(worker_process.Get(), |
| 315 mojo::edk::ConnectionParam(mojo_channel.PassServerHandle())); |
| 315 | 316 |
| 316 channel_ = std::move(server); | 317 channel_ = std::move(server); |
| 317 | 318 |
| 318 ReportProcessLaunched(std::move(worker_process)); | 319 ReportProcessLaunched(std::move(worker_process)); |
| 319 } | 320 } |
| 320 | 321 |
| 321 void UnprivilegedProcessDelegate::Send(IPC::Message* message) { | 322 void UnprivilegedProcessDelegate::Send(IPC::Message* message) { |
| 322 DCHECK(CalledOnValidThread()); | 323 DCHECK(CalledOnValidThread()); |
| 323 | 324 |
| 324 if (channel_) { | 325 if (channel_) { |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 PLOG(ERROR) << "Failed to duplicate a handle"; | 402 PLOG(ERROR) << "Failed to duplicate a handle"; |
| 402 ReportFatalError(); | 403 ReportFatalError(); |
| 403 return; | 404 return; |
| 404 } | 405 } |
| 405 ScopedHandle limited_handle(temp_handle); | 406 ScopedHandle limited_handle(temp_handle); |
| 406 | 407 |
| 407 event_handler_->OnProcessLaunched(std::move(limited_handle)); | 408 event_handler_->OnProcessLaunched(std::move(limited_handle)); |
| 408 } | 409 } |
| 409 | 410 |
| 410 } // namespace remoting | 411 } // namespace remoting |
| OLD | NEW |