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_ipc_server.h" | 5 #include "remoting/host/security_key/security_key_ipc_server.h" |
6 | 6 |
7 #include <cstdint> | 7 #include <cstdint> |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 void SecurityKeyIpcServer::SetFactoryForTest( | 31 void SecurityKeyIpcServer::SetFactoryForTest( |
32 SecurityKeyIpcServerFactory* factory) { | 32 SecurityKeyIpcServerFactory* factory) { |
33 g_factory = factory; | 33 g_factory = factory; |
34 } | 34 } |
35 | 35 |
36 std::unique_ptr<SecurityKeyIpcServer> SecurityKeyIpcServer::Create( | 36 std::unique_ptr<SecurityKeyIpcServer> SecurityKeyIpcServer::Create( |
37 int connection_id, | 37 int connection_id, |
38 ClientSessionDetails* client_session_details, | 38 ClientSessionDetails* client_session_details, |
39 base::TimeDelta initial_connect_timeout, | 39 base::TimeDelta initial_connect_timeout, |
40 const SecurityKeyAuthHandler::SendMessageCallback& message_callback, | 40 const SecurityKeyAuthHandler::SendMessageCallback& message_callback, |
| 41 const base::Closure& connect_callback, |
41 const base::Closure& done_callback) { | 42 const base::Closure& done_callback) { |
42 std::unique_ptr<SecurityKeyIpcServer> ipc_server = | 43 std::unique_ptr<SecurityKeyIpcServer> ipc_server = |
43 g_factory | 44 g_factory |
44 ? g_factory->Create(connection_id, client_session_details, | 45 ? g_factory->Create(connection_id, client_session_details, |
45 initial_connect_timeout, message_callback, | 46 initial_connect_timeout, message_callback, |
46 done_callback) | 47 connect_callback, done_callback) |
47 : base::WrapUnique(new SecurityKeyIpcServerImpl( | 48 : base::WrapUnique(new SecurityKeyIpcServerImpl( |
48 connection_id, client_session_details, initial_connect_timeout, | 49 connection_id, client_session_details, initial_connect_timeout, |
49 message_callback, done_callback)); | 50 message_callback, connect_callback, done_callback)); |
50 | 51 |
51 return ipc_server; | 52 return ipc_server; |
52 } | 53 } |
53 | 54 |
54 } // namespace remoting | 55 } // namespace remoting |
OLD | NEW |