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