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/remote_security_key_message_reader_impl.h" | 5 #include "remoting/host/security_key/remote_security_key_message_reader_impl.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/files/file.h" | 12 #include "base/files/file.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/single_thread_task_runner.h" | 14 #include "base/single_thread_task_runner.h" |
15 #include "base/stl_util.h" | 15 #include "base/stl_util.h" |
16 #include "base/thread_task_runner_handle.h" | 16 #include "base/threading/thread_task_runner_handle.h" |
17 #include "remoting/host/security_key/security_key_message.h" | 17 #include "remoting/host/security_key/security_key_message.h" |
18 | 18 |
19 namespace remoting { | 19 namespace remoting { |
20 | 20 |
21 RemoteSecurityKeyMessageReaderImpl::RemoteSecurityKeyMessageReaderImpl( | 21 RemoteSecurityKeyMessageReaderImpl::RemoteSecurityKeyMessageReaderImpl( |
22 base::File input_file) | 22 base::File input_file) |
23 : read_stream_(std::move(input_file)), | 23 : read_stream_(std::move(input_file)), |
24 reader_thread_("RemoteSecurityKeyMessageReaderImpl"), | 24 reader_thread_("RemoteSecurityKeyMessageReaderImpl"), |
25 weak_factory_(this) { | 25 weak_factory_(this) { |
26 base::Thread::Options options; | 26 base::Thread::Options options; |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 DCHECK(main_task_runner_->RunsTasksOnCurrentThread()); | 135 DCHECK(main_task_runner_->RunsTasksOnCurrentThread()); |
136 message_callback_.Run(std::move(message)); | 136 message_callback_.Run(std::move(message)); |
137 } | 137 } |
138 | 138 |
139 void RemoteSecurityKeyMessageReaderImpl::InvokeErrorCallback() { | 139 void RemoteSecurityKeyMessageReaderImpl::InvokeErrorCallback() { |
140 DCHECK(main_task_runner_->RunsTasksOnCurrentThread()); | 140 DCHECK(main_task_runner_->RunsTasksOnCurrentThread()); |
141 error_callback_.Run(); | 141 error_callback_.Run(); |
142 } | 142 } |
143 | 143 |
144 } // namespace remoting | 144 } // namespace remoting |
OLD | NEW |