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

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

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.cc
diff --git a/remoting/host/security_key/fake_remote_security_key_ipc_server.cc b/remoting/host/security_key/fake_security_key_ipc_server.cc
similarity index 54%
rename from remoting/host/security_key/fake_remote_security_key_ipc_server.cc
rename to remoting/host/security_key/fake_security_key_ipc_server.cc
index e7178bd743500f5513d92e3395fc7c3a6144f816..ea23826e163897a823fed0ea8acdab3166fe5bf5 100644
--- a/remoting/host/security_key/fake_remote_security_key_ipc_server.cc
+++ b/remoting/host/security_key/fake_security_key_ipc_server.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "remoting/host/security_key/fake_remote_security_key_ipc_server.h"
+#include "remoting/host/security_key/fake_security_key_ipc_server.h"
#include <cstdint>
#include <memory>
@@ -15,43 +15,40 @@
#include "ipc/ipc_message.h"
#include "ipc/ipc_message_macros.h"
#include "remoting/host/chromoting_messages.h"
-#include "remoting/host/security_key/gnubby_auth_handler.h"
+#include "remoting/host/security_key/security_key_auth_handler.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace remoting {
-FakeRemoteSecurityKeyIpcServer::FakeRemoteSecurityKeyIpcServer(
+FakeSecurityKeyIpcServer::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)
: connection_id_(connection_id),
send_message_callback_(send_message_callback),
channel_closed_callback_(channel_closed_callback),
weak_factory_(this) {}
-FakeRemoteSecurityKeyIpcServer::~FakeRemoteSecurityKeyIpcServer() {}
+FakeSecurityKeyIpcServer::~FakeSecurityKeyIpcServer() {}
-void FakeRemoteSecurityKeyIpcServer::SendRequest(
- const std::string& message_data) {
+void FakeSecurityKeyIpcServer::SendRequest(const std::string& message_data) {
send_message_callback_.Run(connection_id_, message_data);
}
-void FakeRemoteSecurityKeyIpcServer::CloseChannel() {
+void FakeSecurityKeyIpcServer::CloseChannel() {
ipc_channel_.reset();
channel_closed_callback_.Run();
}
-base::WeakPtr<FakeRemoteSecurityKeyIpcServer>
-FakeRemoteSecurityKeyIpcServer::AsWeakPtr() {
+base::WeakPtr<FakeSecurityKeyIpcServer> FakeSecurityKeyIpcServer::AsWeakPtr() {
return weak_factory_.GetWeakPtr();
}
-bool FakeRemoteSecurityKeyIpcServer::OnMessageReceived(
- const IPC::Message& message) {
+bool FakeSecurityKeyIpcServer::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
- IPC_BEGIN_MESSAGE_MAP(FakeRemoteSecurityKeyIpcServer, message)
+ IPC_BEGIN_MESSAGE_MAP(FakeSecurityKeyIpcServer, message)
IPC_MESSAGE_HANDLER(ChromotingRemoteSecurityKeyToNetworkMsg_Request,
SendRequest)
IPC_MESSAGE_UNHANDLED(handled = false)
@@ -61,13 +58,12 @@ bool FakeRemoteSecurityKeyIpcServer::OnMessageReceived(
return handled;
}
-void FakeRemoteSecurityKeyIpcServer::OnChannelConnected(int32_t peer_pid) {}
+void FakeSecurityKeyIpcServer::OnChannelConnected(int32_t peer_pid) {}
-void FakeRemoteSecurityKeyIpcServer::OnChannelError() {}
+void FakeSecurityKeyIpcServer::OnChannelError() {}
-bool FakeRemoteSecurityKeyIpcServer::CreateChannel(
- const std::string& channel_name,
- base::TimeDelta request_timeout) {
+bool FakeSecurityKeyIpcServer::CreateChannel(const std::string& channel_name,
+ base::TimeDelta request_timeout) {
channel_name_ = channel_name;
ipc_channel_ =
@@ -76,8 +72,7 @@ bool FakeRemoteSecurityKeyIpcServer::CreateChannel(
return ipc_channel_->Connect();
}
-bool FakeRemoteSecurityKeyIpcServer::SendResponse(
- const std::string& message_data) {
+bool FakeSecurityKeyIpcServer::SendResponse(const std::string& message_data) {
last_message_received_ = message_data;
// This class works in two modes: one in which the test wants the IPC channel
@@ -93,34 +88,32 @@ bool FakeRemoteSecurityKeyIpcServer::SendResponse(
new ChromotingNetworkToRemoteSecurityKeyMsg_Response(message_data));
}
-FakeRemoteSecurityKeyIpcServerFactory::FakeRemoteSecurityKeyIpcServerFactory() {
- RemoteSecurityKeyIpcServer::SetFactoryForTest(this);
+FakeSecurityKeyIpcServerFactory::FakeSecurityKeyIpcServerFactory() {
+ SecurityKeyIpcServer::SetFactoryForTest(this);
}
-FakeRemoteSecurityKeyIpcServerFactory::
- ~FakeRemoteSecurityKeyIpcServerFactory() {
- RemoteSecurityKeyIpcServer::SetFactoryForTest(nullptr);
+FakeSecurityKeyIpcServerFactory::~FakeSecurityKeyIpcServerFactory() {
+ SecurityKeyIpcServer::SetFactoryForTest(nullptr);
}
-std::unique_ptr<RemoteSecurityKeyIpcServer>
-FakeRemoteSecurityKeyIpcServerFactory::Create(
+std::unique_ptr<SecurityKeyIpcServer> FakeSecurityKeyIpcServerFactory::Create(
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& done_callback) {
- std::unique_ptr<FakeRemoteSecurityKeyIpcServer> fake_ipc_server(
- new FakeRemoteSecurityKeyIpcServer(connection_id, peer_session_id,
- initial_connect_timeout,
- send_message_callback, done_callback));
+ std::unique_ptr<FakeSecurityKeyIpcServer> fake_ipc_server(
+ new FakeSecurityKeyIpcServer(connection_id, peer_session_id,
+ initial_connect_timeout,
+ send_message_callback, done_callback));
ipc_server_map_[connection_id] = fake_ipc_server->AsWeakPtr();
return base::WrapUnique(fake_ipc_server.release());
}
-base::WeakPtr<FakeRemoteSecurityKeyIpcServer>
-FakeRemoteSecurityKeyIpcServerFactory::GetIpcServerObject(int connection_id) {
+base::WeakPtr<FakeSecurityKeyIpcServer>
+FakeSecurityKeyIpcServerFactory::GetIpcServerObject(int connection_id) {
return ipc_server_map_[connection_id];
}

Powered by Google App Engine
This is Rietveld 408576698