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

Unified Diff: remoting/host/win/wts_session_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/win/wts_session_process_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/win/wts_session_process_delegate.cc
diff --git a/remoting/host/win/wts_session_process_delegate.cc b/remoting/host/win/wts_session_process_delegate.cc
index 74659f7aa7642538eccc6b0d86a286240c094dce..434e5df1e3bfba3208a608d6fe8c1c527ed6c4a1 100644
--- a/remoting/host/win/wts_session_process_delegate.cc
+++ b/remoting/host/win/wts_session_process_delegate.cc
@@ -62,6 +62,7 @@ class WtsSessionProcessDelegate::Core
virtual bool Send(IPC::Message* message) OVERRIDE;
// WorkerProcessLauncher::Delegate implementation.
+ virtual void CloseChannel() OVERRIDE;
virtual DWORD GetProcessId() const OVERRIDE;
virtual bool IsPermanentError(int failure_count) const OVERRIDE;
virtual void KillProcess(DWORD exit_code) OVERRIDE;
@@ -173,7 +174,7 @@ void WtsSessionProcessDelegate::Core::OnIOCompleted(
bool WtsSessionProcessDelegate::Core::Send(IPC::Message* message) {
DCHECK(main_task_runner_->BelongsToCurrentThread());
- if (channel_.get()) {
+ if (channel_) {
return channel_->Send(message);
} else {
delete message;
@@ -181,6 +182,13 @@ bool WtsSessionProcessDelegate::Core::Send(IPC::Message* message) {
}
}
+void WtsSessionProcessDelegate::Core::CloseChannel() {
+ DCHECK(main_task_runner_->BelongsToCurrentThread());
+
+ channel_.reset();
+ pipe_.Close();
+}
+
DWORD WtsSessionProcessDelegate::Core::GetProcessId() const {
DWORD pid = 0;
if (launch_elevated_ && pipe_.IsValid() &&
@@ -496,6 +504,11 @@ bool WtsSessionProcessDelegate::Send(IPC::Message* message) {
return core_->Send(message);
}
+void WtsSessionProcessDelegate::CloseChannel() {
+ if (core_)
+ core_->CloseChannel();
+}
+
DWORD WtsSessionProcessDelegate::GetProcessId() const {
if (!core_)
return 0;
« no previous file with comments | « remoting/host/win/wts_session_process_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698