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/fake_remote_security_key_message_writer.h" | 5 #include "remoting/host/security_key/fake_remote_security_key_message_writer.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/location.h" | 11 #include "base/location.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "base/thread_task_runner_handle.h" | 14 #include "base/threading/thread_task_runner_handle.h" |
15 #include "remoting/host/security_key/security_key_message.h" | 15 #include "remoting/host/security_key/security_key_message.h" |
16 | 16 |
17 namespace remoting { | 17 namespace remoting { |
18 | 18 |
19 FakeRemoteSecurityKeyMessageWriter::FakeRemoteSecurityKeyMessageWriter( | 19 FakeRemoteSecurityKeyMessageWriter::FakeRemoteSecurityKeyMessageWriter( |
20 const base::Closure& write_callback) | 20 const base::Closure& write_callback) |
21 : write_callback_(write_callback), weak_factory_(this) { | 21 : write_callback_(write_callback), weak_factory_(this) { |
22 DCHECK(!write_callback_.is_null()); | 22 DCHECK(!write_callback_.is_null()); |
23 } | 23 } |
24 | 24 |
(...skipping 19 matching lines...) Expand all Loading... |
44 const std::string& message_payload) { | 44 const std::string& message_payload) { |
45 last_message_type_ = message_type; | 45 last_message_type_ = message_type; |
46 last_message_payload_ = message_payload; | 46 last_message_payload_ = message_payload; |
47 | 47 |
48 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, write_callback_); | 48 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, write_callback_); |
49 | 49 |
50 return write_request_succeeded_; | 50 return write_request_succeeded_; |
51 } | 51 } |
52 | 52 |
53 } // namespace remoting | 53 } // namespace remoting |
OLD | NEW |