| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_WEBSOCKET_TRANSPORT_CLIENT_SOCKET_POOL_H_ | 5 #ifndef NET_SOCKET_WEBSOCKET_TRANSPORT_CLIENT_SOCKET_POOL_H_ |
| 6 #define NET_SOCKET_WEBSOCKET_TRANSPORT_CLIENT_SOCKET_POOL_H_ | 6 #define NET_SOCKET_WEBSOCKET_TRANSPORT_CLIENT_SOCKET_POOL_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 | 93 |
| 94 TransportConnectJobHelper helper_; | 94 TransportConnectJobHelper helper_; |
| 95 | 95 |
| 96 // The addresses are divided into IPv4 and IPv6, which are performed partially | 96 // The addresses are divided into IPv4 and IPv6, which are performed partially |
| 97 // in parallel. If the list of IPv6 addresses is non-empty, then the IPv6 jobs | 97 // in parallel. If the list of IPv6 addresses is non-empty, then the IPv6 jobs |
| 98 // go first, followed after |kIPv6FallbackTimerInMs| by the IPv4 | 98 // go first, followed after |kIPv6FallbackTimerInMs| by the IPv4 |
| 99 // addresses. First sub-job to establish a connection wins. | 99 // addresses. First sub-job to establish a connection wins. |
| 100 scoped_ptr<WebSocketTransportConnectSubJob> ipv4_job_; | 100 scoped_ptr<WebSocketTransportConnectSubJob> ipv4_job_; |
| 101 scoped_ptr<WebSocketTransportConnectSubJob> ipv6_job_; | 101 scoped_ptr<WebSocketTransportConnectSubJob> ipv6_job_; |
| 102 | 102 |
| 103 base::OneShotTimer<WebSocketTransportConnectJob> fallback_timer_; | 103 base::OneShotTimer fallback_timer_; |
| 104 TransportConnectJobHelper::ConnectionLatencyHistogram race_result_; | 104 TransportConnectJobHelper::ConnectionLatencyHistogram race_result_; |
| 105 ClientSocketHandle* const handle_; | 105 ClientSocketHandle* const handle_; |
| 106 CompletionCallback callback_; | 106 CompletionCallback callback_; |
| 107 BoundNetLog request_net_log_; | 107 BoundNetLog request_net_log_; |
| 108 | 108 |
| 109 bool had_ipv4_; | 109 bool had_ipv4_; |
| 110 bool had_ipv6_; | 110 bool had_ipv6_; |
| 111 | 111 |
| 112 DISALLOW_COPY_AND_ASSIGN(WebSocketTransportConnectJob); | 112 DISALLOW_COPY_AND_ASSIGN(WebSocketTransportConnectJob); |
| 113 }; | 113 }; |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 bool flushing_; | 233 bool flushing_; |
| 234 | 234 |
| 235 base::WeakPtrFactory<WebSocketTransportClientSocketPool> weak_factory_; | 235 base::WeakPtrFactory<WebSocketTransportClientSocketPool> weak_factory_; |
| 236 | 236 |
| 237 DISALLOW_COPY_AND_ASSIGN(WebSocketTransportClientSocketPool); | 237 DISALLOW_COPY_AND_ASSIGN(WebSocketTransportClientSocketPool); |
| 238 }; | 238 }; |
| 239 | 239 |
| 240 } // namespace net | 240 } // namespace net |
| 241 | 241 |
| 242 #endif // NET_SOCKET_WEBSOCKET_TRANSPORT_CLIENT_SOCKET_POOL_H_ | 242 #endif // NET_SOCKET_WEBSOCKET_TRANSPORT_CLIENT_SOCKET_POOL_H_ |
| OLD | NEW |