| 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_message_handler.h" | 5 #include "remoting/host/security_key/security_key_message_handler.h" |
| 6 | 6 |
| 7 #include <cstdint> | 7 #include <cstdint> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/callback_helpers.h" | 13 #include "base/callback_helpers.h" |
| 14 #include "remoting/host/security_key/security_key_ipc_client.h" | 14 #include "remoting/host/security_key/security_key_ipc_client.h" |
| 15 #include "remoting/host/security_key/security_key_ipc_constants.h" | 15 #include "remoting/host/security_key/security_key_ipc_constants.h" |
| 16 #include "remoting/host/security_key/security_key_message_reader_impl.h" | 16 #include "remoting/host/security_key/security_key_message_reader_impl.h" |
| 17 #include "remoting/host/security_key/security_key_message_writer_impl.h" | 17 #include "remoting/host/security_key/security_key_message_writer_impl.h" |
| 18 | 18 |
| 19 namespace remoting { | 19 namespace remoting { |
| 20 | 20 |
| 21 SecurityKeyMessageHandler::SecurityKeyMessageHandler() {} | 21 SecurityKeyMessageHandler::SecurityKeyMessageHandler() {} |
| 22 | 22 |
| 23 SecurityKeyMessageHandler::~SecurityKeyMessageHandler() {} | 23 SecurityKeyMessageHandler::~SecurityKeyMessageHandler() { |
| 24 DCHECK(thread_checker_.CalledOnValidThread()); |
| 25 } |
| 24 | 26 |
| 25 void SecurityKeyMessageHandler::Start( | 27 void SecurityKeyMessageHandler::Start( |
| 26 base::File message_read_stream, | 28 base::File message_read_stream, |
| 27 base::File message_write_stream, | 29 base::File message_write_stream, |
| 28 std::unique_ptr<SecurityKeyIpcClient> ipc_client, | 30 std::unique_ptr<SecurityKeyIpcClient> ipc_client, |
| 29 const base::Closure& error_callback) { | 31 const base::Closure& error_callback) { |
| 30 DCHECK(thread_checker_.CalledOnValidThread()); | 32 DCHECK(thread_checker_.CalledOnValidThread()); |
| 31 DCHECK(message_read_stream.IsValid()); | 33 DCHECK(message_read_stream.IsValid()); |
| 32 DCHECK(message_write_stream.IsValid()); | 34 DCHECK(message_write_stream.IsValid()); |
| 33 DCHECK(ipc_client); | 35 DCHECK(ipc_client); |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 ipc_client_.reset(); | 183 ipc_client_.reset(); |
| 182 writer_.reset(); | 184 writer_.reset(); |
| 183 reader_.reset(); | 185 reader_.reset(); |
| 184 | 186 |
| 185 if (!error_callback_.is_null()) { | 187 if (!error_callback_.is_null()) { |
| 186 base::ResetAndReturn(&error_callback_).Run(); | 188 base::ResetAndReturn(&error_callback_).Run(); |
| 187 } | 189 } |
| 188 } | 190 } |
| 189 | 191 |
| 190 } // namespace remoting | 192 } // namespace remoting |
| OLD | NEW |