Chromium Code Reviews| 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/win/wts_session_process_delegate.h" | 8 #include "remoting/host/win/wts_session_process_delegate.h" |
| 9 | 9 |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 407 | 407 |
| 408 security_attributes.reset(new SECURITY_ATTRIBUTES()); | 408 security_attributes.reset(new SECURITY_ATTRIBUTES()); |
| 409 security_attributes->nLength = sizeof(SECURITY_ATTRIBUTES); | 409 security_attributes->nLength = sizeof(SECURITY_ATTRIBUTES); |
| 410 security_attributes->lpSecurityDescriptor = security_descriptor.get(); | 410 security_attributes->lpSecurityDescriptor = security_descriptor.get(); |
| 411 security_attributes->bInheritHandle = FALSE; | 411 security_attributes->bInheritHandle = FALSE; |
| 412 } | 412 } |
| 413 | 413 |
| 414 // Try to launch the process. | 414 // Try to launch the process. |
| 415 ScopedHandle worker_process; | 415 ScopedHandle worker_process; |
| 416 ScopedHandle worker_thread; | 416 ScopedHandle worker_thread; |
| 417 if (!LaunchProcessWithToken(command_line.GetProgram(), | 417 if (!LaunchProcessWithToken( |
| 418 command_line.GetCommandLineString(), | 418 command_line.GetProgram(), command_line.GetCommandLineString(), |
| 419 session_token_.Get(), | 419 session_token_.Get(), security_attributes.get(), nullptr, {}, |
|
joedow
2016/10/20 17:40:04
add some comments for the hard-coded params like /
Sam McNally
2016/10/20 22:40:22
Done.
| |
| 420 security_attributes.get(), | 420 CREATE_SUSPENDED | CREATE_BREAKAWAY_FROM_JOB, |
| 421 nullptr, | 421 base::UTF8ToUTF16(kDefaultDesktopName).c_str(), &worker_process, |
| 422 false, | 422 &worker_thread)) { |
| 423 CREATE_SUSPENDED | CREATE_BREAKAWAY_FROM_JOB, | |
| 424 base::UTF8ToUTF16(kDefaultDesktopName).c_str(), | |
| 425 &worker_process, | |
| 426 &worker_thread)) { | |
| 427 ReportFatalError(); | 423 ReportFatalError(); |
| 428 return; | 424 return; |
| 429 } | 425 } |
| 430 | 426 |
| 431 if (launch_elevated_) { | 427 if (launch_elevated_) { |
| 432 if (!AssignProcessToJobObject(job_.Get(), worker_process.Get())) { | 428 if (!AssignProcessToJobObject(job_.Get(), worker_process.Get())) { |
| 433 PLOG(ERROR) << "Failed to assign the worker to the job object"; | 429 PLOG(ERROR) << "Failed to assign the worker to the job object"; |
| 434 ReportFatalError(); | 430 ReportFatalError(); |
| 435 return; | 431 return; |
| 436 } | 432 } |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 572 | 568 |
| 573 void WtsSessionProcessDelegate::CloseChannel() { | 569 void WtsSessionProcessDelegate::CloseChannel() { |
| 574 core_->CloseChannel(); | 570 core_->CloseChannel(); |
| 575 } | 571 } |
| 576 | 572 |
| 577 void WtsSessionProcessDelegate::KillProcess() { | 573 void WtsSessionProcessDelegate::KillProcess() { |
| 578 core_->KillProcess(); | 574 core_->KillProcess(); |
| 579 } | 575 } |
| 580 | 576 |
| 581 } // namespace remoting | 577 } // namespace remoting |
| OLD | NEW |