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 "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 info.BasicLimitInformation.ActiveProcessLimit = 2; | 429 info.BasicLimitInformation.ActiveProcessLimit = 2; |
430 if (!SetInformationJobObject(job, | 430 if (!SetInformationJobObject(job, |
431 JobObjectExtendedLimitInformation, | 431 JobObjectExtendedLimitInformation, |
432 &info, | 432 &info, |
433 sizeof(info))) { | 433 sizeof(info))) { |
434 LOG_GETLASTERROR(ERROR) << "Failed to set limits on the job object"; | 434 LOG_GETLASTERROR(ERROR) << "Failed to set limits on the job object"; |
435 return; | 435 return; |
436 } | 436 } |
437 | 437 |
438 // Register to receive job notifications via the I/O thread's completion port. | 438 // Register to receive job notifications via the I/O thread's completion port. |
439 if (!MessageLoopForIO::current()->RegisterJobObject(job, this)) { | 439 if (!base::MessageLoopForIO::current()->RegisterJobObject(job, this)) { |
440 LOG_GETLASTERROR(ERROR) | 440 LOG_GETLASTERROR(ERROR) |
441 << "Failed to associate the job object with a completion port"; | 441 << "Failed to associate the job object with a completion port"; |
442 return; | 442 return; |
443 } | 443 } |
444 | 444 |
445 // ScopedHandle is not compatible with base::Passed, so we wrap it to a scoped | 445 // ScopedHandle is not compatible with base::Passed, so we wrap it to a scoped |
446 // pointer. | 446 // pointer. |
447 scoped_ptr<ScopedHandle> job_wrapper(new ScopedHandle()); | 447 scoped_ptr<ScopedHandle> job_wrapper(new ScopedHandle()); |
448 *job_wrapper = job.Pass(); | 448 *job_wrapper = job.Pass(); |
449 | 449 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 bool WtsSessionProcessDelegate::LaunchProcess( | 531 bool WtsSessionProcessDelegate::LaunchProcess( |
532 IPC::Listener* delegate, | 532 IPC::Listener* delegate, |
533 base::win::ScopedHandle* process_exit_event_out) { | 533 base::win::ScopedHandle* process_exit_event_out) { |
534 if (!core_) | 534 if (!core_) |
535 return false; | 535 return false; |
536 | 536 |
537 return core_->LaunchProcess(delegate, process_exit_event_out); | 537 return core_->LaunchProcess(delegate, process_exit_event_out); |
538 } | 538 } |
539 | 539 |
540 } // namespace remoting | 540 } // namespace remoting |
OLD | NEW |