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/gnubby_auth_handler.h" | 5 #include "remoting/host/security_key/gnubby_auth_handler.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <unistd.h> | 8 #include <unistd.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 // Sockets by connection id used to process gnubbyd requests. | 106 // Sockets by connection id used to process gnubbyd requests. |
107 ActiveSockets active_sockets_; | 107 ActiveSockets active_sockets_; |
108 | 108 |
109 // Timeout used for a request. | 109 // Timeout used for a request. |
110 base::TimeDelta request_timeout_; | 110 base::TimeDelta request_timeout_; |
111 | 111 |
112 DISALLOW_COPY_AND_ASSIGN(GnubbyAuthHandlerLinux); | 112 DISALLOW_COPY_AND_ASSIGN(GnubbyAuthHandlerLinux); |
113 }; | 113 }; |
114 | 114 |
115 std::unique_ptr<GnubbyAuthHandler> GnubbyAuthHandler::Create( | 115 std::unique_ptr<GnubbyAuthHandler> GnubbyAuthHandler::Create( |
116 const SendMessageCallback& callback) { | 116 ClientSessionDetails* client_session_details, |
| 117 const SendMessageCallback& send_message_callback) { |
117 std::unique_ptr<GnubbyAuthHandler> auth_handler(new GnubbyAuthHandlerLinux()); | 118 std::unique_ptr<GnubbyAuthHandler> auth_handler(new GnubbyAuthHandlerLinux()); |
118 auth_handler->SetSendMessageCallback(callback); | 119 auth_handler->SetSendMessageCallback(send_message_callback); |
119 return auth_handler; | 120 return auth_handler; |
120 } | 121 } |
121 | 122 |
122 void GnubbyAuthHandler::SetGnubbySocketName( | 123 void GnubbyAuthHandler::SetGnubbySocketName( |
123 const base::FilePath& gnubby_socket_name) { | 124 const base::FilePath& gnubby_socket_name) { |
124 g_gnubby_socket_name.Get() = gnubby_socket_name; | 125 g_gnubby_socket_name.Get() = gnubby_socket_name; |
125 } | 126 } |
126 | 127 |
127 GnubbyAuthHandlerLinux::GnubbyAuthHandlerLinux() | 128 GnubbyAuthHandlerLinux::GnubbyAuthHandlerLinux() |
128 : last_connection_id_(0), | 129 : last_connection_id_(0), |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 | 274 |
274 void GnubbyAuthHandlerLinux::RequestTimedOut(int gnubby_connection_id) { | 275 void GnubbyAuthHandlerLinux::RequestTimedOut(int gnubby_connection_id) { |
275 HOST_LOG << "Gnubby request timed out"; | 276 HOST_LOG << "Gnubby request timed out"; |
276 ActiveSockets::const_iterator iter = | 277 ActiveSockets::const_iterator iter = |
277 active_sockets_.find(gnubby_connection_id); | 278 active_sockets_.find(gnubby_connection_id); |
278 if (iter != active_sockets_.end()) | 279 if (iter != active_sockets_.end()) |
279 SendErrorAndCloseActiveSocket(iter); | 280 SendErrorAndCloseActiveSocket(iter); |
280 } | 281 } |
281 | 282 |
282 } // namespace remoting | 283 } // namespace remoting |
OLD | NEW |