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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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( | 340 IPC::AttachmentBroker::GetGlobal()->RegisterCommunicationChannel( |
341 channel_.get()); | 341 channel_.get(), io_task_runner_); |
342 | 342 |
343 ReportProcessLaunched(std::move(worker_process)); | 343 ReportProcessLaunched(std::move(worker_process)); |
344 } | 344 } |
345 | 345 |
346 void UnprivilegedProcessDelegate::Send(IPC::Message* message) { | 346 void UnprivilegedProcessDelegate::Send(IPC::Message* message) { |
347 DCHECK(CalledOnValidThread()); | 347 DCHECK(CalledOnValidThread()); |
348 | 348 |
349 if (channel_) { | 349 if (channel_) { |
350 channel_->Send(message); | 350 channel_->Send(message); |
351 } else { | 351 } else { |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 PLOG(ERROR) << "Failed to duplicate a handle"; | 432 PLOG(ERROR) << "Failed to duplicate a handle"; |
433 ReportFatalError(); | 433 ReportFatalError(); |
434 return; | 434 return; |
435 } | 435 } |
436 ScopedHandle limited_handle(temp_handle); | 436 ScopedHandle limited_handle(temp_handle); |
437 | 437 |
438 event_handler_->OnProcessLaunched(std::move(limited_handle)); | 438 event_handler_->OnProcessLaunched(std::move(limited_handle)); |
439 } | 439 } |
440 | 440 |
441 } // namespace remoting | 441 } // namespace remoting |
OLD | NEW |