| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "remoting/host/security_key/security_key_ipc_server_impl.h" | 5 #include "remoting/host/security_key/security_key_ipc_server_impl.h" |
| 6 | 6 |
| 7 #include <cstdint> | 7 #include <cstdint> |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 connect_callback_(connect_callback), | 56 connect_callback_(connect_callback), |
| 57 done_callback_(done_callback), | 57 done_callback_(done_callback), |
| 58 message_callback_(message_callback), | 58 message_callback_(message_callback), |
| 59 weak_factory_(this) { | 59 weak_factory_(this) { |
| 60 DCHECK_GT(connection_id_, 0); | 60 DCHECK_GT(connection_id_, 0); |
| 61 DCHECK(!done_callback_.is_null()); | 61 DCHECK(!done_callback_.is_null()); |
| 62 DCHECK(!message_callback_.is_null()); | 62 DCHECK(!message_callback_.is_null()); |
| 63 } | 63 } |
| 64 | 64 |
| 65 SecurityKeyIpcServerImpl::~SecurityKeyIpcServerImpl() { | 65 SecurityKeyIpcServerImpl::~SecurityKeyIpcServerImpl() { |
| 66 DCHECK(thread_checker_.CalledOnValidThread()); |
| 66 CloseChannel(); | 67 CloseChannel(); |
| 67 } | 68 } |
| 68 | 69 |
| 69 bool SecurityKeyIpcServerImpl::CreateChannel( | 70 bool SecurityKeyIpcServerImpl::CreateChannel( |
| 70 const mojo::edk::NamedPlatformHandle& channel_handle, | 71 const mojo::edk::NamedPlatformHandle& channel_handle, |
| 71 base::TimeDelta request_timeout) { | 72 base::TimeDelta request_timeout) { |
| 72 DCHECK(thread_checker_.CalledOnValidThread()); | 73 DCHECK(thread_checker_.CalledOnValidThread()); |
| 73 DCHECK(!ipc_channel_); | 74 DCHECK(!ipc_channel_); |
| 74 security_key_request_timeout_ = request_timeout; | 75 security_key_request_timeout_ = request_timeout; |
| 75 | 76 |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 connection_close_pending_ = false; | 214 connection_close_pending_ = false; |
| 214 } | 215 } |
| 215 // Close the underlying mojo connection. | 216 // Close the underlying mojo connection. |
| 216 if (!mojo_peer_token_.empty()) { | 217 if (!mojo_peer_token_.empty()) { |
| 217 mojo::edk::ClosePeerConnection(mojo_peer_token_); | 218 mojo::edk::ClosePeerConnection(mojo_peer_token_); |
| 218 mojo_peer_token_.clear(); | 219 mojo_peer_token_.clear(); |
| 219 } | 220 } |
| 220 } | 221 } |
| 221 | 222 |
| 222 } // namespace remoting | 223 } // namespace remoting |
| OLD | NEW |