| 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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 if (!LaunchProcessWithToken( | 330 if (!LaunchProcessWithToken( |
| 331 command_line.GetProgram(), command_line.GetCommandLineString(), | 331 command_line.GetProgram(), command_line.GetCommandLineString(), |
| 332 token.Get(), &process_attributes, &thread_attributes, true, 0, | 332 token.Get(), &process_attributes, &thread_attributes, true, 0, |
| 333 nullptr, &worker_process, &worker_thread)) { | 333 nullptr, &worker_process, &worker_thread)) { |
| 334 ReportFatalError(); | 334 ReportFatalError(); |
| 335 return; | 335 return; |
| 336 } | 336 } |
| 337 } | 337 } |
| 338 | 338 |
| 339 channel_ = std::move(server); | 339 channel_ = std::move(server); |
| 340 IPC::AttachmentBroker::GetGlobal()->RegisterCommunicationChannel( | |
| 341 channel_.get(), io_task_runner_); | |
| 342 | 340 |
| 343 ReportProcessLaunched(std::move(worker_process)); | 341 ReportProcessLaunched(std::move(worker_process)); |
| 344 } | 342 } |
| 345 | 343 |
| 346 void UnprivilegedProcessDelegate::Send(IPC::Message* message) { | 344 void UnprivilegedProcessDelegate::Send(IPC::Message* message) { |
| 347 DCHECK(CalledOnValidThread()); | 345 DCHECK(CalledOnValidThread()); |
| 348 | 346 |
| 349 if (channel_) { | 347 if (channel_) { |
| 350 channel_->Send(message); | 348 channel_->Send(message); |
| 351 } else { | 349 } else { |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 PLOG(ERROR) << "Failed to duplicate a handle"; | 430 PLOG(ERROR) << "Failed to duplicate a handle"; |
| 433 ReportFatalError(); | 431 ReportFatalError(); |
| 434 return; | 432 return; |
| 435 } | 433 } |
| 436 ScopedHandle limited_handle(temp_handle); | 434 ScopedHandle limited_handle(temp_handle); |
| 437 | 435 |
| 438 event_handler_->OnProcessLaunched(std::move(limited_handle)); | 436 event_handler_->OnProcessLaunched(std::move(limited_handle)); |
| 439 } | 437 } |
| 440 | 438 |
| 441 } // namespace remoting | 439 } // namespace remoting |
| OLD | NEW |