| Index: remoting/host/security_key/security_key_ipc_client.cc
|
| diff --git a/remoting/host/security_key/remote_security_key_ipc_client.cc b/remoting/host/security_key/security_key_ipc_client.cc
|
| similarity index 84%
|
| rename from remoting/host/security_key/remote_security_key_ipc_client.cc
|
| rename to remoting/host/security_key/security_key_ipc_client.cc
|
| index 0acf28a91e4e7cbdca481e0baafb06711a7f647e..98dcaf1fcf5c6fa900a1d65a91b463a0d863cca1 100644
|
| --- a/remoting/host/security_key/remote_security_key_ipc_client.cc
|
| +++ b/remoting/host/security_key/security_key_ipc_client.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/remote_security_key_ipc_client.h"
|
| +#include "remoting/host/security_key/security_key_ipc_client.h"
|
|
|
| #include <string>
|
|
|
| @@ -16,17 +16,17 @@
|
| #include "ipc/ipc_message_macros.h"
|
| #include "remoting/host/chromoting_messages.h"
|
| #include "remoting/host/ipc_constants.h"
|
| -#include "remoting/host/security_key/remote_security_key_ipc_constants.h"
|
| +#include "remoting/host/security_key/security_key_ipc_constants.h"
|
|
|
| namespace remoting {
|
|
|
| -RemoteSecurityKeyIpcClient::RemoteSecurityKeyIpcClient()
|
| - : initial_ipc_channel_name_(remoting::GetRemoteSecurityKeyIpcChannelName()),
|
| +SecurityKeyIpcClient::SecurityKeyIpcClient()
|
| + : initial_ipc_channel_name_(remoting::GetSecurityKeyIpcChannelName()),
|
| weak_factory_(this) {}
|
|
|
| -RemoteSecurityKeyIpcClient::~RemoteSecurityKeyIpcClient() {}
|
| +SecurityKeyIpcClient::~SecurityKeyIpcClient() {}
|
|
|
| -bool RemoteSecurityKeyIpcClient::WaitForSecurityKeyIpcServerChannel() {
|
| +bool SecurityKeyIpcClient::WaitForSecurityKeyIpcServerChannel() {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
|
|
| // The retry loop is needed as the IPC Servers we connect to are reset (torn
|
| @@ -51,7 +51,7 @@ bool RemoteSecurityKeyIpcClient::WaitForSecurityKeyIpcServerChannel() {
|
| return false;
|
| }
|
|
|
| -void RemoteSecurityKeyIpcClient::EstablishIpcConnection(
|
| +void SecurityKeyIpcClient::EstablishIpcConnection(
|
| const base::Closure& connection_ready_callback,
|
| const base::Closure& connection_error_callback) {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| @@ -65,7 +65,7 @@ void RemoteSecurityKeyIpcClient::EstablishIpcConnection(
|
| ConnectToIpcChannel(initial_ipc_channel_name_);
|
| }
|
|
|
| -bool RemoteSecurityKeyIpcClient::SendSecurityKeyRequest(
|
| +bool SecurityKeyIpcClient::SendSecurityKeyRequest(
|
| const std::string& request_payload,
|
| const ResponseCallback& response_callback) {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| @@ -88,27 +88,26 @@ bool RemoteSecurityKeyIpcClient::SendSecurityKeyRequest(
|
| new ChromotingRemoteSecurityKeyToNetworkMsg_Request(request_payload));
|
| }
|
|
|
| -void RemoteSecurityKeyIpcClient::CloseIpcConnection() {
|
| +void SecurityKeyIpcClient::CloseIpcConnection() {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| ipc_channel_.reset();
|
| }
|
|
|
| -void RemoteSecurityKeyIpcClient::SetInitialIpcChannelNameForTest(
|
| +void SecurityKeyIpcClient::SetInitialIpcChannelNameForTest(
|
| const std::string& initial_ipc_channel_name) {
|
| initial_ipc_channel_name_ = initial_ipc_channel_name;
|
| }
|
|
|
| -void RemoteSecurityKeyIpcClient::SetExpectedIpcServerSessionIdForTest(
|
| +void SecurityKeyIpcClient::SetExpectedIpcServerSessionIdForTest(
|
| uint32_t expected_session_id) {
|
| expected_ipc_server_session_id_ = expected_session_id;
|
| }
|
|
|
| -bool RemoteSecurityKeyIpcClient::OnMessageReceived(
|
| - const IPC::Message& message) {
|
| +bool SecurityKeyIpcClient::OnMessageReceived(const IPC::Message& message) {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
|
|
| bool handled = true;
|
| - IPC_BEGIN_MESSAGE_MAP(RemoteSecurityKeyIpcClient, message)
|
| + IPC_BEGIN_MESSAGE_MAP(SecurityKeyIpcClient, message)
|
| IPC_MESSAGE_HANDLER(
|
| ChromotingNetworkToRemoteSecurityKeyMsg_ConnectionDetails,
|
| OnConnectionDetails)
|
| @@ -121,7 +120,7 @@ bool RemoteSecurityKeyIpcClient::OnMessageReceived(
|
| return handled;
|
| }
|
|
|
| -void RemoteSecurityKeyIpcClient::OnChannelConnected(int32_t peer_pid) {
|
| +void SecurityKeyIpcClient::OnChannelConnected(int32_t peer_pid) {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
|
|
| #if defined(OS_WIN)
|
| @@ -151,7 +150,7 @@ void RemoteSecurityKeyIpcClient::OnChannelConnected(int32_t peer_pid) {
|
| }
|
| }
|
|
|
| -void RemoteSecurityKeyIpcClient::OnChannelError() {
|
| +void SecurityKeyIpcClient::OnChannelError() {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
|
|
| if (!connection_error_callback_.is_null()) {
|
| @@ -159,7 +158,7 @@ void RemoteSecurityKeyIpcClient::OnChannelError() {
|
| }
|
| }
|
|
|
| -void RemoteSecurityKeyIpcClient::OnConnectionDetails(
|
| +void SecurityKeyIpcClient::OnConnectionDetails(
|
| const std::string& channel_name) {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| ipc_channel_name_ = channel_name;
|
| @@ -171,12 +170,12 @@ void RemoteSecurityKeyIpcClient::OnConnectionDetails(
|
| // existing IPC message handler, thus we post the tasks so they will be
|
| // handled after this method completes.
|
| base::ThreadTaskRunnerHandle::Get()->PostTask(
|
| - FROM_HERE, base::Bind(&RemoteSecurityKeyIpcClient::ConnectToIpcChannel,
|
| + FROM_HERE, base::Bind(&SecurityKeyIpcClient::ConnectToIpcChannel,
|
| weak_factory_.GetWeakPtr(),
|
| base::ConstRef(ipc_channel_name_)));
|
| }
|
|
|
| -void RemoteSecurityKeyIpcClient::OnSecurityKeyResponse(
|
| +void SecurityKeyIpcClient::OnSecurityKeyResponse(
|
| const std::string& response_data) {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| DCHECK(!connection_error_callback_.is_null());
|
| @@ -189,7 +188,7 @@ void RemoteSecurityKeyIpcClient::OnSecurityKeyResponse(
|
| }
|
| }
|
|
|
| -void RemoteSecurityKeyIpcClient::ConnectToIpcChannel(
|
| +void SecurityKeyIpcClient::ConnectToIpcChannel(
|
| const std::string& channel_name) {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
|
|
|
|