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

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

Issue 2478443002: Use ChannelMojo for remote security key channels. (Closed)
Patch Set: 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_client.h
diff --git a/remoting/host/security_key/security_key_ipc_client.h b/remoting/host/security_key/security_key_ipc_client.h
index 1a284e55502d7a9c877caf1a1253b4f68994308c..d5bac944a40e7c882e3860e35ede3fc076a3641a 100644
--- a/remoting/host/security_key/security_key_ipc_client.h
+++ b/remoting/host/security_key/security_key_ipc_client.h
@@ -12,6 +12,8 @@
#include "base/memory/weak_ptr.h"
#include "base/threading/thread_checker.h"
#include "ipc/ipc_listener.h"
+#include "mojo/edk/embedder/named_platform_handle.h"
+#include "mojo/edk/embedder/scoped_platform_handle.h"
namespace IPC {
class Channel;
@@ -55,10 +57,9 @@ class SecurityKeyIpcClient : public IPC::Listener {
// Closes the IPC channel if connected.
virtual void CloseIpcConnection();
- // Allows tests to override the initial IPC channel used to retrieve IPC
- // connection details.
- void SetInitialIpcChannelNameForTest(
- const std::string& initial_ipc_channel_name);
+ // Allows tests to override the IPC channel.
+ void SetIpcChannelHandleForTest(
+ const mojo::edk::NamedPlatformHandle& channel_handle);
// Allows tests to override the expected session ID.
void SetExpectedIpcServerSessionIdForTest(uint32_t expected_session_id);
@@ -76,17 +77,18 @@ class SecurityKeyIpcClient : public IPC::Listener {
void OnSecurityKeyResponse(const std::string& request_data);
// Establishes a connection to the specified IPC Server channel.
- void ConnectToIpcChannel(const std::string& channel_name);
+ void ConnectToIpcChannel();
// Used to validate the IPC Server process is running in the correct session.
// '0' (default) corresponds to the session the network process runs in.
uint32_t expected_ipc_server_session_id_ = 0;
- // Name for the IPC channel used for exchanging security key messages.
- std::string ipc_channel_name_;
// Name of the initial IPC channel used to retrieve connection info.
- std::string initial_ipc_channel_name_;
+ mojo::edk::NamedPlatformHandle named_channel_handle_;
+
+ // A handle for the IPC channel used for exchanging security key messages.
+ mojo::edk::ScopedPlatformHandle channel_handle_;
// Signaled when the IPC connection is ready for security key requests.
base::Closure connection_ready_callback_;

Powered by Google App Engine
This is Rietveld 408576698