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_auth_handler.h" | 5 #include "remoting/host/security_key/security_key_auth_handler.h" |
6 | 6 |
7 #include <cstdint> | 7 #include <cstdint> |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/location.h" | 13 #include "base/location.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
16 #include "base/strings/stringprintf.h" | 16 #include "base/strings/stringprintf.h" |
17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
18 #include "base/threading/thread_checker.h" | 18 #include "base/threading/thread_checker.h" |
19 #include "base/threading/thread_task_runner_handle.h" | 19 #include "base/threading/thread_task_runner_handle.h" |
20 #include "base/time/time.h" | 20 #include "base/time/time.h" |
21 #include "base/timer/timer.h" | 21 #include "base/timer/timer.h" |
22 #include "base/win/win_util.h" | 22 #include "base/win/win_util.h" |
23 #include "ipc/ipc_channel.h" | 23 #include "ipc/ipc_channel.h" |
24 #include "ipc/ipc_listener.h" | 24 #include "ipc/ipc_listener.h" |
25 #include "ipc/ipc_message.h" | 25 #include "ipc/ipc_message.h" |
26 #include "ipc/ipc_message_macros.h" | 26 #include "ipc/ipc_message_macros.h" |
27 #include "remoting/base/logging.h" | 27 #include "remoting/base/logging.h" |
28 #include "remoting/host/chromoting_messages.h" | 28 #include "remoting/host/chromoting_messages.h" |
29 #include "remoting/host/client_session_details.h" | 29 #include "remoting/host/client_session_details.h" |
30 #include "remoting/host/ipc_util.h" | |
31 #include "remoting/host/security_key/security_key_ipc_constants.h" | 30 #include "remoting/host/security_key/security_key_ipc_constants.h" |
32 #include "remoting/host/security_key/security_key_ipc_server.h" | 31 #include "remoting/host/security_key/security_key_ipc_server.h" |
33 | 32 |
34 namespace { | 33 namespace { |
35 | 34 |
36 // The timeout used to disconnect a client from the IPC Server channel if it | 35 // The timeout used to disconnect a client from the IPC Server channel if it |
37 // forgets to do so. This ensures the server channel is not blocked forever. | 36 // forgets to do so. This ensures the server channel is not blocked forever. |
38 constexpr base::TimeDelta kInitialRequestTimeout = | 37 constexpr base::TimeDelta kInitialRequestTimeout = |
39 base::TimeDelta::FromSeconds(5); | 38 base::TimeDelta::FromSeconds(5); |
40 | 39 |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 SecurityKeyAuthHandlerWin::GetChannelForConnectionId(int connection_id) const { | 215 SecurityKeyAuthHandlerWin::GetChannelForConnectionId(int connection_id) const { |
217 return active_channels_.find(connection_id); | 216 return active_channels_.find(connection_id); |
218 } | 217 } |
219 | 218 |
220 void SecurityKeyAuthHandlerWin::OnChannelConnected() { | 219 void SecurityKeyAuthHandlerWin::OnChannelConnected() { |
221 // Create another server to accept the next connection. | 220 // Create another server to accept the next connection. |
222 StartIpcServerChannel(); | 221 StartIpcServerChannel(); |
223 } | 222 } |
224 | 223 |
225 } // namespace remoting | 224 } // namespace remoting |
OLD | NEW |