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_extension.h" | 5 #include "remoting/host/security_key/security_key_extension.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/single_thread_task_runner.h" |
8 #include "remoting/host/security_key/security_key_extension_session.h" | 10 #include "remoting/host/security_key/security_key_extension_session.h" |
9 | 11 |
10 namespace { | 12 namespace { |
11 // TODO(joedow): Update this once clients support sending a security key | 13 // TODO(joedow): Update this once clients support sending a security key |
12 // capabililty. Tracked via: crbug.com/587485 | 14 // capabililty. Tracked via: crbug.com/587485 |
13 const char kCapability[] = ""; | 15 const char kCapability[] = ""; |
14 } | 16 } |
15 | 17 |
16 namespace remoting { | 18 namespace remoting { |
17 | 19 |
18 SecurityKeyExtension::SecurityKeyExtension() {} | 20 SecurityKeyExtension::SecurityKeyExtension( |
| 21 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner) |
| 22 : file_task_runner_(file_task_runner) {} |
19 | 23 |
20 SecurityKeyExtension::~SecurityKeyExtension() {} | 24 SecurityKeyExtension::~SecurityKeyExtension() {} |
21 | 25 |
22 std::string SecurityKeyExtension::capability() const { | 26 std::string SecurityKeyExtension::capability() const { |
23 return kCapability; | 27 return kCapability; |
24 } | 28 } |
25 | 29 |
26 std::unique_ptr<HostExtensionSession> | 30 std::unique_ptr<HostExtensionSession> |
27 SecurityKeyExtension::CreateExtensionSession( | 31 SecurityKeyExtension::CreateExtensionSession( |
28 ClientSessionDetails* details, | 32 ClientSessionDetails* details, |
29 protocol::ClientStub* client_stub) { | 33 protocol::ClientStub* client_stub) { |
30 // TODO(joedow): Update this mechanism to allow for multiple sessions. The | 34 // TODO(joedow): Update this mechanism to allow for multiple sessions. The |
31 // extension will only send messages through the initial | 35 // extension will only send messages through the initial |
32 // |client_stub| and |details| with the current design. | 36 // |client_stub| and |details| with the current design. |
33 return base::WrapUnique( | 37 return base::WrapUnique( |
34 new SecurityKeyExtensionSession(details, client_stub)); | 38 new SecurityKeyExtensionSession(details, client_stub, file_task_runner_)); |
35 } | 39 } |
36 | 40 |
37 } // namespace remoting | 41 } // namespace remoting |
OLD | NEW |