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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 HostPortPair("host", 80), | 122 HostPortPair("host", 80), |
123 session_->http_auth_cache(), | 123 session_->http_auth_cache(), |
124 session_->http_auth_handler_factory(), | 124 session_->http_auth_handler_factory(), |
125 session_->spdy_session_pool(), | 125 session_->spdy_session_pool(), |
126 true, | 126 true, |
127 NULL)), | 127 NULL)), |
128 http_proxy_histograms_("MockHttpProxy"), | 128 http_proxy_histograms_("MockHttpProxy"), |
129 http_proxy_socket_pool_(kMaxSockets, | 129 http_proxy_socket_pool_(kMaxSockets, |
130 kMaxSocketsPerGroup, | 130 kMaxSocketsPerGroup, |
131 &http_proxy_histograms_, | 131 &http_proxy_histograms_, |
132 &host_resolver_, | |
133 &transport_socket_pool_, | 132 &transport_socket_pool_, |
134 NULL, | 133 NULL, |
135 NULL), | 134 NULL), |
136 enable_ssl_connect_job_waiting_(false) { | 135 enable_ssl_connect_job_waiting_(false) { |
137 scoped_refptr<SSLConfigService> ssl_config_service( | 136 scoped_refptr<SSLConfigService> ssl_config_service( |
138 new SSLConfigServiceDefaults); | 137 new SSLConfigServiceDefaults); |
139 ssl_config_service->GetSSLConfig(&ssl_config_); | 138 ssl_config_service->GetSSLConfig(&ssl_config_); |
140 } | 139 } |
141 | 140 |
142 void CreatePool(bool transport_pool, bool http_proxy_pool, bool socks_pool) { | 141 void CreatePool(bool transport_pool, bool http_proxy_pool, bool socks_pool) { |
143 ssl_histograms_.reset(new ClientSocketPoolHistograms("SSLUnitTest")); | 142 ssl_histograms_.reset(new ClientSocketPoolHistograms("SSLUnitTest")); |
144 pool_.reset(new SSLClientSocketPool( | 143 pool_.reset(new SSLClientSocketPool( |
145 kMaxSockets, kMaxSocketsPerGroup, ssl_histograms_.get(), | 144 kMaxSockets, kMaxSocketsPerGroup, ssl_histograms_.get(), |
146 NULL /* host_resolver */, NULL /* cert_verifier */, | 145 NULL /* cert_verifier */, NULL /* channel_id_service */, |
147 NULL /* channel_id_service */, NULL /* transport_security_state */, | 146 NULL /* transport_security_state */, |
148 NULL /* cert_transparency_verifier */, NULL /* cert_policy_enforcer */, | 147 NULL /* cert_transparency_verifier */, NULL /* cert_policy_enforcer */, |
149 std::string() /* ssl_session_cache_shard */, &socket_factory_, | 148 std::string() /* ssl_session_cache_shard */, &socket_factory_, |
150 transport_pool ? &transport_socket_pool_ : NULL, | 149 transport_pool ? &transport_socket_pool_ : NULL, |
151 socks_pool ? &socks_socket_pool_ : NULL, | 150 socks_pool ? &socks_socket_pool_ : NULL, |
152 http_proxy_pool ? &http_proxy_socket_pool_ : NULL, NULL, | 151 http_proxy_pool ? &http_proxy_socket_pool_ : NULL, NULL, |
153 enable_ssl_connect_job_waiting_, NULL)); | 152 enable_ssl_connect_job_waiting_, NULL)); |
154 } | 153 } |
155 | 154 |
156 scoped_refptr<SSLSocketParams> SSLParams(ProxyServer::Scheme proxy, | 155 scoped_refptr<SSLSocketParams> SSLParams(ProxyServer::Scheme proxy, |
157 bool want_spdy_over_npn) { | 156 bool want_spdy_over_npn) { |
(...skipping 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1387 ssl.channel_id_sent = true; | 1386 ssl.channel_id_sent = true; |
1388 ssl.SetNextProto(GetParam()); | 1387 ssl.SetNextProto(GetParam()); |
1389 TestIPPoolingDisabled(&ssl); | 1388 TestIPPoolingDisabled(&ssl); |
1390 } | 1389 } |
1391 | 1390 |
1392 // It would be nice to also test the timeouts in SSLClientSocketPool. | 1391 // It would be nice to also test the timeouts in SSLClientSocketPool. |
1393 | 1392 |
1394 } // namespace | 1393 } // namespace |
1395 | 1394 |
1396 } // namespace net | 1395 } // namespace net |
OLD | NEW |