Chromium Code Reviews| Index: remoting/host/desktop_session_proxy.cc |
| diff --git a/remoting/host/desktop_session_proxy.cc b/remoting/host/desktop_session_proxy.cc |
| index 636c177695e2114ff538339108783cb4b53337ae..ed7ba98793e6048cad24942bfb4bb5dbd6f1220b 100644 |
| --- a/remoting/host/desktop_session_proxy.cc |
| +++ b/remoting/host/desktop_session_proxy.cc |
| @@ -200,6 +200,13 @@ void DesktopSessionProxy::OnChannelConnected(int32_t peer_pid) { |
| DCHECK(caller_task_runner_->BelongsToCurrentThread()); |
| VLOG(1) << "IPC: network <- desktop (" << peer_pid << ")"; |
| + |
| +#if defined(OS_WIN) |
| + if (!ProcessIdToSessionId(peer_pid, |
|
Sergey Ulanov
2016/06/23 22:35:53
Can we assume that the session_id will never chang
joedow
2016/06/23 23:26:04
The session ID will never change for the desktop_h
|
| + reinterpret_cast<DWORD*>(&desktop_session_id_))) { |
|
Sergey Ulanov
2016/06/23 22:35:53
Do you need this cast? DWORD should be equivalent
joedow
2016/06/23 23:26:04
You would think it would be unnecessary but compil
|
| + PLOG(ERROR) << "ProcessIdToSessionId() failed!"; |
| + } |
| +#endif // defined(OS_WIN) |
| } |
| void DesktopSessionProxy::OnChannelError() { |
| @@ -253,6 +260,7 @@ void DesktopSessionProxy::DetachFromDesktop() { |
| DCHECK(caller_task_runner_->BelongsToCurrentThread()); |
| desktop_channel_.reset(); |
| + desktop_session_id_ = UINT32_MAX; |
| if (desktop_process_.IsValid()) |
| desktop_process_.Close(); |