| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef NET_SOCKET_TRANSPORT_CLIENT_SOCKET_POOL_H_ | 5 #ifndef NET_SOCKET_TRANSPORT_CLIENT_SOCKET_POOL_H_ |
| 6 #define NET_SOCKET_TRANSPORT_CLIENT_SOCKET_POOL_H_ | 6 #define NET_SOCKET_TRANSPORT_CLIENT_SOCKET_POOL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
| 14 #include "base/timer/timer.h" | 14 #include "base/timer/timer.h" |
| 15 #include "net/base/host_port_pair.h" | 15 #include "net/base/host_port_pair.h" |
| 16 #include "net/dns/host_resolver.h" | 16 #include "net/dns/host_resolver.h" |
| 17 #include "net/dns/single_request_host_resolver.h" | |
| 18 #include "net/socket/client_socket_pool.h" | 17 #include "net/socket/client_socket_pool.h" |
| 19 #include "net/socket/client_socket_pool_base.h" | 18 #include "net/socket/client_socket_pool_base.h" |
| 20 #include "net/socket/connection_attempts.h" | 19 #include "net/socket/connection_attempts.h" |
| 21 | 20 |
| 22 namespace net { | 21 namespace net { |
| 23 | 22 |
| 24 class ClientSocketFactory; | 23 class ClientSocketFactory; |
| 25 class SocketPerformanceWatcherFactory; | 24 class SocketPerformanceWatcherFactory; |
| 26 | 25 |
| 27 typedef base::Callback<int(const AddressList&, const BoundNetLog& net_log)> | 26 typedef base::Callback<int(const AddressList&, const BoundNetLog& net_log)> |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 void DoIPv6FallbackTransportConnectComplete(int result); | 156 void DoIPv6FallbackTransportConnectComplete(int result); |
| 158 | 157 |
| 159 // Begins the host resolution and the TCP connect. Returns OK on success | 158 // Begins the host resolution and the TCP connect. Returns OK on success |
| 160 // and ERR_IO_PENDING if it cannot immediately service the request. | 159 // and ERR_IO_PENDING if it cannot immediately service the request. |
| 161 // Otherwise, it returns a net error code. | 160 // Otherwise, it returns a net error code. |
| 162 int ConnectInternal() override; | 161 int ConnectInternal() override; |
| 163 | 162 |
| 164 void CopyConnectionAttemptsFromSockets(); | 163 void CopyConnectionAttemptsFromSockets(); |
| 165 | 164 |
| 166 scoped_refptr<TransportSocketParams> params_; | 165 scoped_refptr<TransportSocketParams> params_; |
| 167 SingleRequestHostResolver resolver_; | 166 HostResolver* resolver_; |
| 167 std::unique_ptr<HostResolver::Request> request_; |
| 168 ClientSocketFactory* const client_socket_factory_; | 168 ClientSocketFactory* const client_socket_factory_; |
| 169 | 169 |
| 170 State next_state_; | 170 State next_state_; |
| 171 | 171 |
| 172 std::unique_ptr<StreamSocket> transport_socket_; | 172 std::unique_ptr<StreamSocket> transport_socket_; |
| 173 AddressList addresses_; | 173 AddressList addresses_; |
| 174 | 174 |
| 175 std::unique_ptr<StreamSocket> fallback_transport_socket_; | 175 std::unique_ptr<StreamSocket> fallback_transport_socket_; |
| 176 std::unique_ptr<AddressList> fallback_addresses_; | 176 std::unique_ptr<AddressList> fallback_addresses_; |
| 177 base::TimeTicks fallback_connect_start_time_; | 177 base::TimeTicks fallback_connect_start_time_; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 }; | 286 }; |
| 287 | 287 |
| 288 PoolBase base_; | 288 PoolBase base_; |
| 289 | 289 |
| 290 DISALLOW_COPY_AND_ASSIGN(TransportClientSocketPool); | 290 DISALLOW_COPY_AND_ASSIGN(TransportClientSocketPool); |
| 291 }; | 291 }; |
| 292 | 292 |
| 293 } // namespace net | 293 } // namespace net |
| 294 | 294 |
| 295 #endif // NET_SOCKET_TRANSPORT_CLIENT_SOCKET_POOL_H_ | 295 #endif // NET_SOCKET_TRANSPORT_CLIENT_SOCKET_POOL_H_ |
| OLD | NEW |