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

Unified Diff: remoting/host/security_key/fake_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/fake_security_key_ipc_client.h
diff --git a/remoting/host/security_key/fake_security_key_ipc_client.h b/remoting/host/security_key/fake_security_key_ipc_client.h
index 7dc3b116d788cbace708cc4ce031dc27fc2d05f2..1c1edaa9fe53aa23426ecafa36e7ddda166e1798 100644
--- a/remoting/host/security_key/fake_security_key_ipc_client.h
+++ b/remoting/host/security_key/fake_security_key_ipc_client.h
@@ -11,6 +11,7 @@
#include "base/callback_forward.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
+#include "mojo/edk/embedder/named_platform_handle.h"
#include "remoting/host/security_key/security_key_ipc_client.h"
namespace IPC {
@@ -30,7 +31,7 @@ class FakeSecurityKeyIpcClient : public SecurityKeyIpcClient {
~FakeSecurityKeyIpcClient() override;
// SecurityKeyIpcClient interface.
- bool WaitForSecurityKeyIpcServerChannel() override;
+ bool CheckForSecurityKeyIpcServerChannel() override;
void EstablishIpcConnection(
const base::Closure& connection_ready_callback,
const base::Closure& connection_error_callback) override;
@@ -40,7 +41,7 @@ class FakeSecurityKeyIpcClient : public SecurityKeyIpcClient {
void CloseIpcConnection() override;
// Connects as a client to the |channel_name| IPC Channel.
- bool ConnectViaIpc(const std::string& channel_name);
+ bool ConnectViaIpc(const mojo::edk::NamedPlatformHandle& channel_handle);
// Override of SendSecurityKeyRequest() interface method for tests which use
// an IPC channel for testing.
@@ -54,8 +55,8 @@ class FakeSecurityKeyIpcClient : public SecurityKeyIpcClient {
bool ipc_channel_connected() { return ipc_channel_connected_; }
- void set_wait_for_ipc_channel_return_value(bool return_value) {
- wait_for_ipc_channel_return_value_ = return_value;
+ void set_check_for_ipc_channel_return_value(bool return_value) {
+ check_for_ipc_channel_return_value_ = return_value;
}
void set_establish_ipc_connection_should_succeed(bool should_succeed) {
@@ -76,10 +77,6 @@ class FakeSecurityKeyIpcClient : public SecurityKeyIpcClient {
void OnChannelConnected(int32_t peer_pid) override;
void OnChannelError() override;
- // Handles the initial IPC message used to establish a side channel with this
- // IPC Client instance.
- void OnConnectionDetails(const std::string& request_data);
-
// Handles security key response IPC messages.
void OnSecurityKeyResponse(const std::string& request_data);
@@ -98,8 +95,8 @@ class FakeSecurityKeyIpcClient : public SecurityKeyIpcClient {
// Determines whether SendSecurityKeyRequest() returns success or failure.
bool send_security_request_should_succeed_ = true;
- // Value returned by WaitForSecurityKeyIpcServerChannel() method.
- bool wait_for_ipc_channel_return_value_ = true;
+ // Value returned by CheckForSecurityKeyIpcServerChannel() method.
+ bool check_for_ipc_channel_return_value_ = true;
// Stores whether a connection to the server IPC channel is active.
bool ipc_channel_connected_ = false;

Powered by Google App Engine
This is Rietveld 408576698