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.h" | 5 #include "remoting/host/security_key/security_key_message_reader.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 SecurityKeyMessageReader::SecurityKeyMessageReader(base::File input_file) | 22 SecurityKeyMessageReader::SecurityKeyMessageReader(base::File input_file) |
22 : read_stream_(std::move(input_file)), | 23 : read_stream_(std::move(input_file)), |
23 reader_thread_("SecurityKeyMessageReader"), | 24 reader_thread_("SecurityKeyMessageReader"), |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 DCHECK(main_task_runner_->RunsTasksOnCurrentThread()); | 124 DCHECK(main_task_runner_->RunsTasksOnCurrentThread()); |
124 message_callback_.Run(std::move(message)); | 125 message_callback_.Run(std::move(message)); |
125 } | 126 } |
126 | 127 |
127 void SecurityKeyMessageReader::InvokeErrorCallback() { | 128 void SecurityKeyMessageReader::InvokeErrorCallback() { |
128 DCHECK(main_task_runner_->RunsTasksOnCurrentThread()); | 129 DCHECK(main_task_runner_->RunsTasksOnCurrentThread()); |
129 error_callback_.Run(); | 130 error_callback_.Run(); |
130 } | 131 } |
131 | 132 |
132 } // namespace remoting | 133 } // namespace remoting |
OLD | NEW |