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

Unified Diff: remoting/host/security_key/security_key_ipc_server_impl.cc

Issue 2468523003: Pass the desktop session ID to the remoting network process. (Closed)
Patch Set: rebase Created 4 years, 1 month 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
Index: remoting/host/security_key/security_key_ipc_server_impl.cc
diff --git a/remoting/host/security_key/security_key_ipc_server_impl.cc b/remoting/host/security_key/security_key_ipc_server_impl.cc
index c39d0d1aa666ae95994dcb46e0b2681581d72809..b62d76322aea7890ff1f02ff03ac3b2985a0f798 100644
--- a/remoting/host/security_key/security_key_ipc_server_impl.cc
+++ b/remoting/host/security_key/security_key_ipc_server_impl.cc
@@ -19,6 +19,7 @@
#include "ipc/ipc_message_macros.h"
#include "remoting/base/logging.h"
#include "remoting/host/chromoting_messages.h"
+#include "remoting/host/client_session_details.h"
#if defined(OS_WIN)
#include "base/strings/stringprintf.h"
@@ -41,12 +42,12 @@ namespace remoting {
SecurityKeyIpcServerImpl::SecurityKeyIpcServerImpl(
int connection_id,
- uint32_t peer_session_id,
+ ClientSessionDetails* client_session_details,
base::TimeDelta initial_connect_timeout,
const SecurityKeyAuthHandler::SendMessageCallback& message_callback,
const base::Closure& done_callback)
: connection_id_(connection_id),
- peer_session_id_(peer_session_id),
+ client_session_details_(client_session_details),
initial_connect_timeout_(initial_connect_timeout),
done_callback_(done_callback),
message_callback_(message_callback),
@@ -143,7 +144,7 @@ void SecurityKeyIpcServerImpl::OnChannelConnected(int32_t peer_pid) {
if (!ProcessIdToSessionId(peer_pid, &peer_session_id)) {
PLOG(ERROR) << "ProcessIdToSessionId() failed";
connection_close_pending_ = true;
- } else if (peer_session_id != peer_session_id_) {
+ } else if (peer_session_id != client_session_details_->desktop_session_id()) {
LOG(ERROR) << "Ignoring connection attempt from outside remoted session.";
connection_close_pending_ = true;
}
@@ -154,7 +155,7 @@ void SecurityKeyIpcServerImpl::OnChannelConnected(int32_t peer_pid) {
return;
}
#else // !defined(OS_WIN)
- CHECK_EQ(peer_session_id_, UINT32_MAX);
+ CHECK_EQ(client_session_details_->desktop_session_id(), UINT32_MAX);
#endif // !defined(OS_WIN)
// Reset the timer to give the client a chance to send the request.

Powered by Google App Engine
This is Rietveld 408576698