| 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 #include "net/http/http_proxy_client_socket_pool.h" | 5 #include "net/http/http_proxy_client_socket_pool.h" | 
| 6 | 6 | 
| 7 #include "base/callback.h" | 7 #include "base/callback.h" | 
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" | 
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" | 
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" | 
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 136                                 NULL), | 136                                 NULL), | 
| 137         enable_ssl_connect_job_waiting_(false) { | 137         enable_ssl_connect_job_waiting_(false) { | 
| 138     scoped_refptr<SSLConfigService> ssl_config_service( | 138     scoped_refptr<SSLConfigService> ssl_config_service( | 
| 139         new SSLConfigServiceDefaults); | 139         new SSLConfigServiceDefaults); | 
| 140     ssl_config_service->GetSSLConfig(&ssl_config_); | 140     ssl_config_service->GetSSLConfig(&ssl_config_); | 
| 141   } | 141   } | 
| 142 | 142 | 
| 143   void CreatePool(bool transport_pool, bool http_proxy_pool, bool socks_pool) { | 143   void CreatePool(bool transport_pool, bool http_proxy_pool, bool socks_pool) { | 
| 144     ssl_histograms_.reset(new ClientSocketPoolHistograms("SSLUnitTest")); | 144     ssl_histograms_.reset(new ClientSocketPoolHistograms("SSLUnitTest")); | 
| 145     pool_.reset(new SSLClientSocketPool( | 145     pool_.reset(new SSLClientSocketPool( | 
| 146         kMaxSockets, | 146         kMaxSockets, kMaxSocketsPerGroup, ssl_histograms_.get(), | 
| 147         kMaxSocketsPerGroup, | 147         NULL /* host_resolver */, NULL /* cert_verifier */, | 
| 148         ssl_histograms_.get(), | 148         NULL /* channel_id_service */, NULL /* transport_security_state */, | 
| 149         NULL /* host_resolver */, | 149         NULL /* cert_transparency_verifier */, NULL /* cert_policy_enforcer */, | 
| 150         NULL /* cert_verifier */, | 150         std::string() /* ssl_session_cache_shard */, &socket_factory_, | 
| 151         NULL /* channel_id_service */, |  | 
| 152         NULL /* transport_security_state */, |  | 
| 153         NULL /* cert_transparency_verifier */, |  | 
| 154         std::string() /* ssl_session_cache_shard */, |  | 
| 155         &socket_factory_, |  | 
| 156         transport_pool ? &transport_socket_pool_ : NULL, | 151         transport_pool ? &transport_socket_pool_ : NULL, | 
| 157         socks_pool ? &socks_socket_pool_ : NULL, | 152         socks_pool ? &socks_socket_pool_ : NULL, | 
| 158         http_proxy_pool ? &http_proxy_socket_pool_ : NULL, | 153         http_proxy_pool ? &http_proxy_socket_pool_ : NULL, NULL, | 
| 159         NULL, | 154         enable_ssl_connect_job_waiting_, NULL)); | 
| 160         enable_ssl_connect_job_waiting_, |  | 
| 161         NULL)); |  | 
| 162   } | 155   } | 
| 163 | 156 | 
| 164   scoped_refptr<SSLSocketParams> SSLParams(ProxyServer::Scheme proxy, | 157   scoped_refptr<SSLSocketParams> SSLParams(ProxyServer::Scheme proxy, | 
| 165                                            bool want_spdy_over_npn) { | 158                                            bool want_spdy_over_npn) { | 
| 166     return make_scoped_refptr(new SSLSocketParams( | 159     return make_scoped_refptr(new SSLSocketParams( | 
| 167         proxy == ProxyServer::SCHEME_DIRECT ? direct_transport_socket_params_ | 160         proxy == ProxyServer::SCHEME_DIRECT ? direct_transport_socket_params_ | 
| 168                                             : NULL, | 161                                             : NULL, | 
| 169         proxy == ProxyServer::SCHEME_SOCKS5 ? socks_socket_params_ : NULL, | 162         proxy == ProxyServer::SCHEME_SOCKS5 ? socks_socket_params_ : NULL, | 
| 170         proxy == ProxyServer::SCHEME_HTTP ? http_proxy_socket_params_ : NULL, | 163         proxy == ProxyServer::SCHEME_HTTP ? http_proxy_socket_params_ : NULL, | 
| 171         HostPortPair("host", 443), | 164         HostPortPair("host", 443), | 
| (...skipping 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1395   ssl.channel_id_sent = true; | 1388   ssl.channel_id_sent = true; | 
| 1396   ssl.SetNextProto(GetParam()); | 1389   ssl.SetNextProto(GetParam()); | 
| 1397   TestIPPoolingDisabled(&ssl); | 1390   TestIPPoolingDisabled(&ssl); | 
| 1398 } | 1391 } | 
| 1399 | 1392 | 
| 1400 // It would be nice to also test the timeouts in SSLClientSocketPool. | 1393 // It would be nice to also test the timeouts in SSLClientSocketPool. | 
| 1401 | 1394 | 
| 1402 }  // namespace | 1395 }  // namespace | 
| 1403 | 1396 | 
| 1404 }  // namespace net | 1397 }  // namespace net | 
| OLD | NEW | 
|---|