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

Unified Diff: remoting/host/security_key/remote_security_key_ipc_server_impl.h

Issue 2085353004: Update GnubbyAuthHandler to use the current session ID (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@host_extension
Patch Set: Updating a comment 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
Index: remoting/host/security_key/remote_security_key_ipc_server_impl.h
diff --git a/remoting/host/security_key/remote_security_key_ipc_server_impl.h b/remoting/host/security_key/remote_security_key_ipc_server_impl.h
index c45ff364170e5fb5fb850a5467aec5f405afaa0c..6f34645073fc14c1891bc7df9b06a13d4fb05aa6 100644
--- a/remoting/host/security_key/remote_security_key_ipc_server_impl.h
+++ b/remoting/host/security_key/remote_security_key_ipc_server_impl.h
@@ -7,10 +7,12 @@
#include "remoting/host/security_key/remote_security_key_ipc_server.h"
+#include <cstdint>
#include <memory>
#include <string>
#include "base/callback.h"
+#include "base/memory/weak_ptr.h"
#include "base/threading/thread_checker.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
@@ -34,6 +36,7 @@ class RemoteSecurityKeyIpcServerImpl : public RemoteSecurityKeyIpcServer,
public:
RemoteSecurityKeyIpcServerImpl(
int connection_id,
+ uint32_t peer_session_id,
base::TimeDelta initial_connect_timeout,
const GnubbyAuthHandler::SendMessageCallback& message_callback,
const base::Closure& done_callback);
@@ -56,6 +59,12 @@ class RemoteSecurityKeyIpcServerImpl : public RemoteSecurityKeyIpcServer,
// The value assigned to identify the current IPC channel.
int connection_id_;
+ // The expected session id of the process connecting to the IPC channel.
+ uint32_t peer_session_id_;
+
+ // Tracks whether the connection is in the process of being closed.
+ bool connection_close_pending_ = false;
+
// Timeout for disconnecting the IPC channel if there is no client activity.
base::TimeDelta initial_connect_timeout_;
@@ -79,6 +88,8 @@ class RemoteSecurityKeyIpcServerImpl : public RemoteSecurityKeyIpcServer,
// thread.
base::ThreadChecker thread_checker_;
+ base::WeakPtrFactory<RemoteSecurityKeyIpcServerImpl> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(RemoteSecurityKeyIpcServerImpl);
};

Powered by Google App Engine
This is Rietveld 408576698