| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 void DoIPv6FallbackTransportConnect(); | 101 void DoIPv6FallbackTransportConnect(); |
| 102 void DoIPv6FallbackTransportConnectComplete(int result); | 102 void DoIPv6FallbackTransportConnectComplete(int result); |
| 103 | 103 |
| 104 // Begins the host resolution and the TCP connect. Returns OK on success | 104 // Begins the host resolution and the TCP connect. Returns OK on success |
| 105 // and ERR_IO_PENDING if it cannot immediately service the request. | 105 // and ERR_IO_PENDING if it cannot immediately service the request. |
| 106 // Otherwise, it returns a net error code. | 106 // Otherwise, it returns a net error code. |
| 107 virtual int ConnectInternal() OVERRIDE; | 107 virtual int ConnectInternal() OVERRIDE; |
| 108 | 108 |
| 109 scoped_refptr<TransportSocketParams> params_; | 109 scoped_refptr<TransportSocketParams> params_; |
| 110 ClientSocketFactory* const client_socket_factory_; | 110 ClientSocketFactory* const client_socket_factory_; |
| 111 OldCompletionCallbackImpl<TransportConnectJob> callback_; | |
| 112 SingleRequestHostResolver resolver_; | 111 SingleRequestHostResolver resolver_; |
| 113 AddressList addresses_; | 112 AddressList addresses_; |
| 114 State next_state_; | 113 State next_state_; |
| 115 | 114 |
| 116 // The time Connect() was called. | 115 // The time Connect() was called. |
| 117 base::TimeTicks start_time_; | 116 base::TimeTicks start_time_; |
| 118 | 117 |
| 119 // The time the connect was started (after DNS finished). | 118 // The time the connect was started (after DNS finished). |
| 120 base::TimeTicks connect_start_time_; | 119 base::TimeTicks connect_start_time_; |
| 121 | 120 |
| 122 scoped_ptr<StreamSocket> transport_socket_; | 121 scoped_ptr<StreamSocket> transport_socket_; |
| 123 | 122 |
| 124 scoped_ptr<StreamSocket> fallback_transport_socket_; | 123 scoped_ptr<StreamSocket> fallback_transport_socket_; |
| 125 scoped_ptr<AddressList> fallback_addresses_; | 124 scoped_ptr<AddressList> fallback_addresses_; |
| 126 OldCompletionCallbackImpl<TransportConnectJob> fallback_callback_; | |
| 127 base::TimeTicks fallback_connect_start_time_; | 125 base::TimeTicks fallback_connect_start_time_; |
| 128 base::OneShotTimer<TransportConnectJob> fallback_timer_; | 126 base::OneShotTimer<TransportConnectJob> fallback_timer_; |
| 129 | 127 |
| 130 DISALLOW_COPY_AND_ASSIGN(TransportConnectJob); | 128 DISALLOW_COPY_AND_ASSIGN(TransportConnectJob); |
| 131 }; | 129 }; |
| 132 | 130 |
| 133 class NET_EXPORT_PRIVATE TransportClientSocketPool : public ClientSocketPool { | 131 class NET_EXPORT_PRIVATE TransportClientSocketPool : public ClientSocketPool { |
| 134 public: | 132 public: |
| 135 TransportClientSocketPool( | 133 TransportClientSocketPool( |
| 136 int max_sockets, | 134 int max_sockets, |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 | 225 |
| 228 DISALLOW_COPY_AND_ASSIGN(TransportClientSocketPool); | 226 DISALLOW_COPY_AND_ASSIGN(TransportClientSocketPool); |
| 229 }; | 227 }; |
| 230 | 228 |
| 231 REGISTER_SOCKET_PARAMS_FOR_POOL(TransportClientSocketPool, | 229 REGISTER_SOCKET_PARAMS_FOR_POOL(TransportClientSocketPool, |
| 232 TransportSocketParams); | 230 TransportSocketParams); |
| 233 | 231 |
| 234 } // namespace net | 232 } // namespace net |
| 235 | 233 |
| 236 #endif // NET_SOCKET_TRANSPORT_CLIENT_SOCKET_POOL_H_ | 234 #endif // NET_SOCKET_TRANSPORT_CLIENT_SOCKET_POOL_H_ |
| OLD | NEW |