Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: remoting/host/win/wts_session_process_delegate.cc

Issue 14314026: remoting: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « remoting/host/win/worker_process_launcher_unittest.cc ('k') | remoting/jingle_glue/chromium_socket_factory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698