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

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

Issue 2575963002: Handle Security Key requests from outside the remoted session correctly (Closed)
Patch Set: Addressing CR Feedback Created 4 years 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 1c1edaa9fe53aa23426ecafa36e7ddda166e1798..b3b9523ebb7a4e44e31ba274568ca6536a94324b 100644
--- a/remoting/host/security_key/fake_security_key_ipc_client.h
+++ b/remoting/host/security_key/fake_security_key_ipc_client.h
@@ -33,7 +33,7 @@ class FakeSecurityKeyIpcClient : public SecurityKeyIpcClient {
// SecurityKeyIpcClient interface.
bool CheckForSecurityKeyIpcServerChannel() override;
void EstablishIpcConnection(
- const base::Closure& connection_ready_callback,
+ const ConnectedCallback& connected_callback,
const base::Closure& connection_error_callback) override;
bool SendSecurityKeyRequest(
const std::string& request_payload,
@@ -55,6 +55,10 @@ class FakeSecurityKeyIpcClient : public SecurityKeyIpcClient {
bool ipc_channel_connected() { return ipc_channel_connected_; }
+ bool connection_ready() { return connection_ready_; }
+
+ bool invalid_session_error() { return invalid_session_error_; }
+
void set_check_for_ipc_channel_return_value(bool return_value) {
check_for_ipc_channel_return_value_ = return_value;
}
@@ -80,6 +84,12 @@ class FakeSecurityKeyIpcClient : public SecurityKeyIpcClient {
// Handles security key response IPC messages.
void OnSecurityKeyResponse(const std::string& request_data);
+ // Handles the ConnectionReady IPC message.
+ void OnConnectionReady();
+
+ // Handles the InvalidSession IPC message.
+ void OnInvalidSession();
+
// Called when a change in the IPC channel state has occurred.
base::Closure channel_event_callback_;
@@ -101,6 +111,12 @@ class FakeSecurityKeyIpcClient : public SecurityKeyIpcClient {
// Stores whether a connection to the server IPC channel is active.
bool ipc_channel_connected_ = false;
+ // Tracks whether a ConnectionReady message has been received.
+ bool connection_ready_ = false;
+
+ // Tracks whether an InvalidSession message has been received.
+ bool invalid_session_error_ = false;
+
// Value returned by SendSecurityKeyRequest() method.
std::string security_key_response_payload_;

Powered by Google App Engine
This is Rietveld 408576698