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

Unified Diff: remoting/host/desktop_session_proxy.cc

Issue 2092483002: Provide access to the ID for the remoted Windows session in the network process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rsk_main
Patch Set: Addressing CR Feedback Created 4 years, 6 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/desktop_session_proxy.h ('k') | remoting/host/fake_desktop_environment.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
+ reinterpret_cast<DWORD*>(&desktop_session_id_))) {
+ 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();
« no previous file with comments | « remoting/host/desktop_session_proxy.h ('k') | remoting/host/fake_desktop_environment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698