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

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

Issue 2162083003: Renaming Gnubby and RemoteSecurityKey files/classes/members (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing a GYP build error 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 side-by-side diff with in-line comments
Download patch
Index: remoting/host/security_key/fake_security_key_ipc_server.h
diff --git a/remoting/host/security_key/fake_remote_security_key_ipc_server.h b/remoting/host/security_key/fake_security_key_ipc_server.h
similarity index 70%
rename from remoting/host/security_key/fake_remote_security_key_ipc_server.h
rename to remoting/host/security_key/fake_security_key_ipc_server.h
index 56bdeca3fdc3da97a707e834163f3b437fcc1e84..2a8bc5e9deef6f5fa8d960410b713d72fed9887d 100644
--- a/remoting/host/security_key/fake_remote_security_key_ipc_server.h
+++ b/remoting/host/security_key/fake_security_key_ipc_server.h
@@ -5,7 +5,7 @@
#ifndef REMOTING_HOST_SECURITY_KEY_FAKE_SECURITY_KEY_IPC_SERVER_H_
#define REMOTING_HOST_SECURITY_KEY_FAKE_SECURITY_KEY_IPC_SERVER_H_
-#include "remoting/host/security_key/remote_security_key_ipc_server.h"
+#include "remoting/host/security_key/security_key_ipc_server.h"
#include <cstdint>
#include <map>
@@ -27,18 +27,18 @@ namespace remoting {
// Used to send/receive security key messages for testing. It provides a
// WeakPtr reference to itself which allows tests to verify its lifetime is
// managed properly without interfering with it.
-class FakeRemoteSecurityKeyIpcServer : public RemoteSecurityKeyIpcServer,
- public IPC::Listener {
+class FakeSecurityKeyIpcServer : public SecurityKeyIpcServer,
+ public IPC::Listener {
public:
- FakeRemoteSecurityKeyIpcServer(
+ FakeSecurityKeyIpcServer(
int connection_id,
uint32_t peer_session_id,
base::TimeDelta initial_connect_timeout,
- const GnubbyAuthHandler::SendMessageCallback& send_message_callback,
+ const SecurityKeyAuthHandler::SendMessageCallback& send_message_callback,
const base::Closure& channel_closed_callback);
- ~FakeRemoteSecurityKeyIpcServer() override;
+ ~FakeSecurityKeyIpcServer() override;
- // RemoteSecurityKeyIpcServer interface.
+ // SecurityKeyIpcServer interface.
bool CreateChannel(const std::string& channel_name,
base::TimeDelta request_timeout) override;
bool SendResponse(const std::string& message_data) override;
@@ -50,7 +50,7 @@ class FakeRemoteSecurityKeyIpcServer : public RemoteSecurityKeyIpcServer,
void CloseChannel();
// Returns a WeakPtr reference to this instance.
- base::WeakPtr<FakeRemoteSecurityKeyIpcServer> AsWeakPtr();
+ base::WeakPtr<FakeSecurityKeyIpcServer> AsWeakPtr();
// Returns the payload for the last message received.
const std::string& last_message_received() const {
@@ -83,7 +83,7 @@ class FakeRemoteSecurityKeyIpcServer : public RemoteSecurityKeyIpcServer,
std::string last_message_received_;
// Used to forward security key requests to the remote client.
- GnubbyAuthHandler::SendMessageCallback send_message_callback_;
+ SecurityKeyAuthHandler::SendMessageCallback send_message_callback_;
// Signaled when the IPC channel is closed.
base::Closure channel_closed_callback_;
@@ -95,40 +95,38 @@ class FakeRemoteSecurityKeyIpcServer : public RemoteSecurityKeyIpcServer,
std::unique_ptr<IPC::Channel> ipc_channel_;
// NOTE: Weak pointers must be invalidated before all other member variables.
- base::WeakPtrFactory<FakeRemoteSecurityKeyIpcServer> weak_factory_;
+ base::WeakPtrFactory<FakeSecurityKeyIpcServer> weak_factory_;
- DISALLOW_COPY_AND_ASSIGN(FakeRemoteSecurityKeyIpcServer);
+ DISALLOW_COPY_AND_ASSIGN(FakeSecurityKeyIpcServer);
};
-// Used to create FakeRemoteSecurityKeyIpcServer instances for testing.
+// Used to create FakeSecurityKeyIpcServer instances for testing.
// Provides a method which will return a WeakPtr reference to each instance
// this factory creates. This allows tests to inject/retrieve messages and
// verify the backing instance is destroyed at the appropriate time.
-class FakeRemoteSecurityKeyIpcServerFactory
- : public RemoteSecurityKeyIpcServerFactory {
+class FakeSecurityKeyIpcServerFactory : public SecurityKeyIpcServerFactory {
public:
- FakeRemoteSecurityKeyIpcServerFactory();
- ~FakeRemoteSecurityKeyIpcServerFactory() override;
+ FakeSecurityKeyIpcServerFactory();
+ ~FakeSecurityKeyIpcServerFactory() override;
- // RemoteSecurityKeyIpcServerFactory implementation.
- std::unique_ptr<RemoteSecurityKeyIpcServer> Create(
+ // SecurityKeyIpcServerFactory implementation.
+ std::unique_ptr<SecurityKeyIpcServer> Create(
int connection_id,
uint32_t peer_session_id,
base::TimeDelta initial_connect_timeout,
- const GnubbyAuthHandler::SendMessageCallback& message_callback,
+ const SecurityKeyAuthHandler::SendMessageCallback& message_callback,
const base::Closure& done_callback) override;
- // Provide a WeakPtr reference to the FakeRemoteSecurityKeyIpcServer object
+ // Provide a WeakPtr reference to the FakeSecurityKeyIpcServer object
// created for the |connection_id| IPC channel.
- base::WeakPtr<FakeRemoteSecurityKeyIpcServer> GetIpcServerObject(
- int connection_id);
+ base::WeakPtr<FakeSecurityKeyIpcServer> GetIpcServerObject(int connection_id);
private:
- // Tracks each FakeRemoteSecurityKeyIpcServer instance created by this
+ // Tracks each FakeSecurityKeyIpcServer instance created by this
// factory which allows them to be retrieved and queried for tests.
- std::map<int, base::WeakPtr<FakeRemoteSecurityKeyIpcServer>> ipc_server_map_;
+ std::map<int, base::WeakPtr<FakeSecurityKeyIpcServer>> ipc_server_map_;
- DISALLOW_COPY_AND_ASSIGN(FakeRemoteSecurityKeyIpcServerFactory);
+ DISALLOW_COPY_AND_ASSIGN(FakeSecurityKeyIpcServerFactory);
};
} // namespace remoting
« no previous file with comments | « remoting/host/security_key/fake_security_key_ipc_client.cc ('k') | remoting/host/security_key/fake_security_key_ipc_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698