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

Side by Side Diff: remoting/host/security_key/remote_security_key_ipc_server.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: Fixing a build break Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_HOST_SECURITY_KEY_REMOTE_SECURITY_KEY_IPC_SERVER_H_ 5 #ifndef REMOTING_HOST_SECURITY_KEY_REMOTE_SECURITY_KEY_IPC_SERVER_H_
6 #define REMOTING_HOST_SECURITY_KEY_REMOTE_SECURITY_KEY_IPC_SERVER_H_ 6 #define REMOTING_HOST_SECURITY_KEY_REMOTE_SECURITY_KEY_IPC_SERVER_H_
7 7
8 #include <cstdint>
8 #include <memory> 9 #include <memory>
9 #include <string> 10 #include <string>
10 11
11 #include "base/callback_forward.h" 12 #include "base/callback_forward.h"
12 #include "base/time/time.h" 13 #include "base/time/time.h"
13 #include "remoting/host/security_key/gnubby_auth_handler.h" 14 #include "remoting/host/security_key/gnubby_auth_handler.h"
14 15
15 namespace remoting { 16 namespace remoting {
16 17
17 class RemoteSecurityKeyIpcServerFactory; 18 class RemoteSecurityKeyIpcServerFactory;
18 19
19 // Responsible for handing the server end of the IPC channel between the 20 // Responsible for handing the server end of the IPC channel between the
20 // network process (server) and the remote_security_key process (client). 21 // network process (server) and the remote_security_key process (client).
21 class RemoteSecurityKeyIpcServer { 22 class RemoteSecurityKeyIpcServer {
22 public: 23 public:
23 virtual ~RemoteSecurityKeyIpcServer() {} 24 virtual ~RemoteSecurityKeyIpcServer() {}
24 25
25 // Creates a new RemoteSecurityKeyIpcServer instance. 26 // Creates a new RemoteSecurityKeyIpcServer instance.
26 static std::unique_ptr<RemoteSecurityKeyIpcServer> Create( 27 static std::unique_ptr<RemoteSecurityKeyIpcServer> Create(
27 int connection_id, 28 int connection_id,
29 uint32_t peer_session_id,
28 base::TimeDelta initial_connect_timeout, 30 base::TimeDelta initial_connect_timeout,
29 const GnubbyAuthHandler::SendMessageCallback& message_callback, 31 const GnubbyAuthHandler::SendMessageCallback& message_callback,
30 const base::Closure& done_callback); 32 const base::Closure& done_callback);
31 33
32 // Used to set a Factory to generate fake/mock RemoteSecurityKeyIpcServer 34 // Used to set a Factory to generate fake/mock RemoteSecurityKeyIpcServer
33 // instances for testing. 35 // instances for testing.
34 static void SetFactoryForTest(RemoteSecurityKeyIpcServerFactory* factory); 36 static void SetFactoryForTest(RemoteSecurityKeyIpcServerFactory* factory);
35 37
36 // Creates and starts listening on an IPC channel with the given name. 38 // Creates and starts listening on an IPC channel with the given name.
37 virtual bool CreateChannel(const std::string& channel_name, 39 virtual bool CreateChannel(const std::string& channel_name,
38 base::TimeDelta request_timeout) = 0; 40 base::TimeDelta request_timeout) = 0;
39 41
40 // Sends a security key response IPC message via the IPC channel. 42 // Sends a security key response IPC message via the IPC channel.
41 virtual bool SendResponse(const std::string& message_data) = 0; 43 virtual bool SendResponse(const std::string& message_data) = 0;
42 }; 44 };
43 45
44 // Used to allow for creating Fake/Mock RemoteSecurityKeyIpcServer for testing. 46 // Used to allow for creating Fake/Mock RemoteSecurityKeyIpcServer for testing.
45 class RemoteSecurityKeyIpcServerFactory { 47 class RemoteSecurityKeyIpcServerFactory {
46 public: 48 public:
47 virtual ~RemoteSecurityKeyIpcServerFactory() {} 49 virtual ~RemoteSecurityKeyIpcServerFactory() {}
48 50
49 virtual std::unique_ptr<RemoteSecurityKeyIpcServer> Create( 51 virtual std::unique_ptr<RemoteSecurityKeyIpcServer> Create(
50 int connection_id, 52 int connection_id,
53 uint32_t peer_session_id,
51 base::TimeDelta connect_timeout, 54 base::TimeDelta connect_timeout,
52 const GnubbyAuthHandler::SendMessageCallback& message_callback, 55 const GnubbyAuthHandler::SendMessageCallback& message_callback,
53 const base::Closure& done_callback) = 0; 56 const base::Closure& done_callback) = 0;
54 }; 57 };
55 58
56 } // namespace remoting 59 } // namespace remoting
57 60
58 #endif // REMOTING_HOST_SECURITY_KEY_REMOTE_SECURITY_KEY_IPC_SERVER_H_ 61 #endif // REMOTING_HOST_SECURITY_KEY_REMOTE_SECURITY_KEY_IPC_SERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698