summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authoralexeypa@google.com <alexeypa@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-05 17:53:17 +0000
committeralexeypa@google.com <alexeypa@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-05 17:53:17 +0000
commite68605168dab172242dfc852079654068292c9d4 (patch)
tree307baabba4b6032f1aeb90e28800315e5e6900fa /remoting
parent66b4681aa897eab90175b7b6f56a71cc43d1babc (diff)
downloadchromium_src-e68605168dab172242dfc852079654068292c9d4.zip
chromium_src-e68605168dab172242dfc852079654068292c9d4.tar.gz
chromium_src-e68605168dab172242dfc852079654068292c9d4.tar.bz2
Merge 165543 - Do not use GetNamedPipeClientProcessId() which is available starting from Vista on Windows XP.
BUG=158997 Review URL: https://chromiumcodereview.appspot.com/11358044 TBR=alexeypa@chromium.org Review URL: https://codereview.chromium.org/11312086 git-svn-id: svn://svn.chromium.org/chrome/branches/1312/src@165952 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r--remoting/host/win/wts_session_process_delegate.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/remoting/host/win/wts_session_process_delegate.cc b/remoting/host/win/wts_session_process_delegate.cc
index 8b537ca..22e40e3 100644
--- a/remoting/host/win/wts_session_process_delegate.cc
+++ b/remoting/host/win/wts_session_process_delegate.cc
@@ -187,11 +187,15 @@ bool WtsSessionProcessDelegate::Core::Send(IPC::Message* message) {
DWORD WtsSessionProcessDelegate::Core::GetProcessId() const {
DWORD pid = 0;
- if (pipe_.IsValid() && get_named_pipe_client_pid_(pipe_, &pid)) {
+ if (launch_elevated_ && pipe_.IsValid() &&
+ get_named_pipe_client_pid_(pipe_, &pid)) {
return pid;
- } else {
- return 0;
}
+
+ if (worker_process_.IsValid())
+ return ::GetProcessId(worker_process_);
+
+ return 0;
}
bool WtsSessionProcessDelegate::Core::IsPermanentError(