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

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

Issue 12545006: The worker process launcher can now ask the worker to crash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 9 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 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 UnprivilegedProcessDelegate::~UnprivilegedProcessDelegate() { 225 UnprivilegedProcessDelegate::~UnprivilegedProcessDelegate() {
226 KillProcess(CONTROL_C_EXIT); 226 KillProcess(CONTROL_C_EXIT);
227 } 227 }
228 228
229 bool UnprivilegedProcessDelegate::Send(IPC::Message* message) { 229 bool UnprivilegedProcessDelegate::Send(IPC::Message* message) {
230 DCHECK(main_task_runner_->BelongsToCurrentThread()); 230 DCHECK(main_task_runner_->BelongsToCurrentThread());
231 231
232 return channel_->Send(message); 232 return channel_->Send(message);
233 } 233 }
234 234
235 void UnprivilegedProcessDelegate::CloseChannel() {
236 DCHECK(main_task_runner_->BelongsToCurrentThread());
237
238 channel_.reset();
239 }
240
235 DWORD UnprivilegedProcessDelegate::GetProcessId() const { 241 DWORD UnprivilegedProcessDelegate::GetProcessId() const {
236 if (worker_process_.IsValid()) { 242 if (worker_process_.IsValid()) {
237 return ::GetProcessId(worker_process_); 243 return ::GetProcessId(worker_process_);
238 } else { 244 } else {
239 return 0; 245 return 0;
240 } 246 }
241 } 247 }
242 248
243 bool UnprivilegedProcessDelegate::IsPermanentError(int failure_count) const { 249 bool UnprivilegedProcessDelegate::IsPermanentError(int failure_count) const {
244 // Get exit code of the worker process if it is available. 250 // Get exit code of the worker process if it is available.
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 KillProcess(CONTROL_C_EXIT); 378 KillProcess(CONTROL_C_EXIT);
373 return false; 379 return false;
374 } 380 }
375 381
376 channel_ = server.Pass(); 382 channel_ = server.Pass();
377 *process_exit_event_out = process_exit_event.Pass(); 383 *process_exit_event_out = process_exit_event.Pass();
378 return true; 384 return true;
379 } 385 }
380 386
381 } // namespace remoting 387 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/win/unprivileged_process_delegate.h ('k') | remoting/host/win/worker_process_launcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698