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_reader_impl.h" | 5 #include "remoting/host/security_key/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/message_loop/message_loop.h" |
14 #include "base/single_thread_task_runner.h" | 15 #include "base/single_thread_task_runner.h" |
15 #include "base/stl_util.h" | 16 #include "base/stl_util.h" |
16 #include "base/threading/thread_task_runner_handle.h" | 17 #include "base/threading/thread_task_runner_handle.h" |
17 #include "remoting/host/security_key/security_key_message.h" | 18 #include "remoting/host/security_key/security_key_message.h" |
18 | 19 |
19 namespace remoting { | 20 namespace remoting { |
20 | 21 |
21 SecurityKeyMessageReaderImpl::SecurityKeyMessageReaderImpl( | 22 SecurityKeyMessageReaderImpl::SecurityKeyMessageReaderImpl( |
22 base::File input_file) | 23 base::File input_file) |
23 : read_stream_(std::move(input_file)), | 24 : read_stream_(std::move(input_file)), |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 DCHECK(main_task_runner_->RunsTasksOnCurrentThread()); | 136 DCHECK(main_task_runner_->RunsTasksOnCurrentThread()); |
136 message_callback_.Run(std::move(message)); | 137 message_callback_.Run(std::move(message)); |
137 } | 138 } |
138 | 139 |
139 void SecurityKeyMessageReaderImpl::InvokeErrorCallback() { | 140 void SecurityKeyMessageReaderImpl::InvokeErrorCallback() { |
140 DCHECK(main_task_runner_->RunsTasksOnCurrentThread()); | 141 DCHECK(main_task_runner_->RunsTasksOnCurrentThread()); |
141 error_callback_.Run(); | 142 error_callback_.Run(); |
142 } | 143 } |
143 | 144 |
144 } // namespace remoting | 145 } // namespace remoting |
OLD | NEW |