| Index: remoting/host/security_key/security_key_ipc_client.cc
|
| diff --git a/remoting/host/security_key/security_key_ipc_client.cc b/remoting/host/security_key/security_key_ipc_client.cc
|
| index 43ad72f17b8e735bbd61efd24a502e1f3e6c7e6d..7dd95da86d0032f0053e3c922cbbee877f902c09 100644
|
| --- a/remoting/host/security_key/security_key_ipc_client.cc
|
| +++ b/remoting/host/security_key/security_key_ipc_client.cc
|
| @@ -38,7 +38,7 @@ bool SecurityKeyIpcClient::CheckForSecurityKeyIpcServerChannel() {
|
| }
|
|
|
| void SecurityKeyIpcClient::EstablishIpcConnection(
|
| - const base::Closure& connection_ready_callback,
|
| + const ConnectionReadyCallback& connection_ready_callback,
|
| const base::Closure& connection_error_callback) {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| DCHECK(!connection_ready_callback.is_null());
|
| @@ -96,6 +96,10 @@ bool SecurityKeyIpcClient::OnMessageReceived(const IPC::Message& message) {
|
| IPC_BEGIN_MESSAGE_MAP(SecurityKeyIpcClient, message)
|
| IPC_MESSAGE_HANDLER(ChromotingNetworkToRemoteSecurityKeyMsg_Response,
|
| OnSecurityKeyResponse)
|
| + IPC_MESSAGE_HANDLER(ChromotingNetworkToRemoteSecurityKeyMsg_ConnectionReady,
|
| + OnConnectionReady)
|
| + IPC_MESSAGE_HANDLER(ChromotingNetworkToRemoteSecurityKeyMsg_InvalidSession,
|
| + OnInvalidSession)
|
| IPC_MESSAGE_UNHANDLED(handled = false)
|
| IPC_END_MESSAGE_MAP()
|
|
|
| @@ -122,8 +126,6 @@ void SecurityKeyIpcClient::OnChannelConnected(int32_t peer_pid) {
|
| return;
|
| }
|
| #endif // defined(OS_WIN)
|
| -
|
| - base::ResetAndReturn(&connection_ready_callback_).Run();
|
| }
|
|
|
| void SecurityKeyIpcClient::OnChannelError() {
|
| @@ -147,6 +149,20 @@ void SecurityKeyIpcClient::OnSecurityKeyResponse(
|
| }
|
| }
|
|
|
| +void SecurityKeyIpcClient::OnConnectionReady() {
|
| + DCHECK(thread_checker_.CalledOnValidThread());
|
| + DCHECK(!connection_ready_callback_.is_null());
|
| +
|
| + base::ResetAndReturn(&connection_ready_callback_).Run(true);
|
| +}
|
| +
|
| +void SecurityKeyIpcClient::OnInvalidSession() {
|
| + DCHECK(thread_checker_.CalledOnValidThread());
|
| + DCHECK(!connection_ready_callback_.is_null());
|
| +
|
| + base::ResetAndReturn(&connection_ready_callback_).Run(false);
|
| +}
|
| +
|
| void SecurityKeyIpcClient::ConnectToIpcChannel() {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
|
|
|
|