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
3 // found in the LICENSE file.
5 #include "net/socket/ssl_client_socket_pool.h"
8 #include "base/bind_helpers.h"
9 #include "base/metrics/field_trial.h"
10 #include "base/metrics/histogram_macros.h"
11 #include "base/metrics/sparse_histogram.h"
12 #include "base/profiler/scoped_tracker.h"
13 #include "base/values.h"
14 #include "net/base/host_port_pair.h"
15 #include "net/base/net_errors.h"
16 #include "net/http/http_proxy_client_socket.h"
17 #include "net/http/http_proxy_client_socket_pool.h"
18 #include "net/socket/client_socket_factory.h"
19 #include "net/socket/client_socket_handle.h"
20 #include "net/socket/socks_client_socket_pool.h"
21 #include "net/socket/ssl_client_socket.h"
22 #include "net/socket/transport_client_socket_pool.h"
23 #include "net/ssl/ssl_cert_request_info.h"
24 #include "net/ssl/ssl_connection_status_flags.h"
25 #include "net/ssl/ssl_info.h"
29 SSLSocketParams::SSLSocketParams(
30 const scoped_refptr
<TransportSocketParams
>& direct_params
,
31 const scoped_refptr
<SOCKSSocketParams
>& socks_proxy_params
,
32 const scoped_refptr
<HttpProxySocketParams
>& http_proxy_params
,
33 const HostPortPair
& host_and_port
,
34 const SSLConfig
& ssl_config
,
35 PrivacyMode privacy_mode
,
38 : direct_params_(direct_params
),
39 socks_proxy_params_(socks_proxy_params
),
40 http_proxy_params_(http_proxy_params
),
41 host_and_port_(host_and_port
),
42 ssl_config_(ssl_config
),
43 privacy_mode_(privacy_mode
),
44 load_flags_(load_flags
),
45 expect_spdy_(expect_spdy
),
46 ignore_limits_(false) {
47 if (direct_params_
.get()) {
48 DCHECK(!socks_proxy_params_
.get());
49 DCHECK(!http_proxy_params_
.get());
50 ignore_limits_
= direct_params_
->ignore_limits();
51 } else if (socks_proxy_params_
.get()) {
52 DCHECK(!http_proxy_params_
.get());
53 ignore_limits_
= socks_proxy_params_
->ignore_limits();
55 DCHECK(http_proxy_params_
.get());
56 ignore_limits_
= http_proxy_params_
->ignore_limits();
60 SSLSocketParams::~SSLSocketParams() {}
62 SSLSocketParams::ConnectionType
SSLSocketParams::GetConnectionType() const {
63 if (direct_params_
.get()) {
64 DCHECK(!socks_proxy_params_
.get());
65 DCHECK(!http_proxy_params_
.get());
69 if (socks_proxy_params_
.get()) {
70 DCHECK(!http_proxy_params_
.get());
74 DCHECK(http_proxy_params_
.get());
78 const scoped_refptr
<TransportSocketParams
>&
79 SSLSocketParams::GetDirectConnectionParams() const {
80 DCHECK_EQ(GetConnectionType(), DIRECT
);
81 return direct_params_
;
84 const scoped_refptr
<SOCKSSocketParams
>&
85 SSLSocketParams::GetSocksProxyConnectionParams() const {
86 DCHECK_EQ(GetConnectionType(), SOCKS_PROXY
);
87 return socks_proxy_params_
;
90 const scoped_refptr
<HttpProxySocketParams
>&
91 SSLSocketParams::GetHttpProxyConnectionParams() const {
92 DCHECK_EQ(GetConnectionType(), HTTP_PROXY
);
93 return http_proxy_params_
;
96 // Timeout for the SSL handshake portion of the connect.
97 static const int kSSLHandshakeTimeoutInSeconds
= 30;
99 SSLConnectJob::SSLConnectJob(const std::string
& group_name
,
100 RequestPriority priority
,
101 const scoped_refptr
<SSLSocketParams
>& params
,
102 const base::TimeDelta
& timeout_duration
,
103 TransportClientSocketPool
* transport_pool
,
104 SOCKSClientSocketPool
* socks_pool
,
105 HttpProxyClientSocketPool
* http_proxy_pool
,
106 ClientSocketFactory
* client_socket_factory
,
107 const SSLClientSocketContext
& context
,
110 : ConnectJob(group_name
,
114 BoundNetLog::Make(net_log
, NetLog::SOURCE_CONNECT_JOB
)),
116 transport_pool_(transport_pool
),
117 socks_pool_(socks_pool
),
118 http_proxy_pool_(http_proxy_pool
),
119 client_socket_factory_(client_socket_factory
),
120 context_(context
.cert_verifier
,
121 context
.channel_id_service
,
122 context
.transport_security_state
,
123 context
.cert_transparency_verifier
,
124 context
.cert_policy_enforcer
,
125 (params
->privacy_mode() == PRIVACY_MODE_ENABLED
126 ? "pm/" + context
.ssl_session_cache_shard
127 : context
.ssl_session_cache_shard
)),
129 base::Bind(&SSLConnectJob::OnIOComplete
, base::Unretained(this))) {
132 SSLConnectJob::~SSLConnectJob() {
135 LoadState
SSLConnectJob::GetLoadState() const {
136 switch (next_state_
) {
137 case STATE_TUNNEL_CONNECT_COMPLETE
:
138 if (transport_socket_handle_
->socket())
139 return LOAD_STATE_ESTABLISHING_PROXY_TUNNEL
;
140 // else, fall through.
141 case STATE_TRANSPORT_CONNECT
:
142 case STATE_TRANSPORT_CONNECT_COMPLETE
:
143 case STATE_SOCKS_CONNECT
:
144 case STATE_SOCKS_CONNECT_COMPLETE
:
145 case STATE_TUNNEL_CONNECT
:
146 return transport_socket_handle_
->GetLoadState();
147 case STATE_SSL_CONNECT
:
148 case STATE_SSL_CONNECT_COMPLETE
:
149 return LOAD_STATE_SSL_HANDSHAKE
;
152 return LOAD_STATE_IDLE
;
156 void SSLConnectJob::GetAdditionalErrorState(ClientSocketHandle
* handle
) {
157 // Headers in |error_response_info_| indicate a proxy tunnel setup
158 // problem. See DoTunnelConnectComplete.
159 if (error_response_info_
.headers
.get()) {
160 handle
->set_pending_http_proxy_connection(
161 transport_socket_handle_
.release());
163 handle
->set_ssl_error_response_info(error_response_info_
);
164 if (!connect_timing_
.ssl_start
.is_null())
165 handle
->set_is_ssl_error(true);
167 handle
->set_ssl_failure_state(ssl_socket_
->GetSSLFailureState());
169 handle
->set_connection_attempts(connection_attempts_
);
172 void SSLConnectJob::OnIOComplete(int result
) {
173 int rv
= DoLoop(result
);
174 if (rv
!= ERR_IO_PENDING
)
175 NotifyDelegateOfCompletion(rv
); // Deletes |this|.
178 int SSLConnectJob::DoLoop(int result
) {
179 DCHECK_NE(next_state_
, STATE_NONE
);
183 State state
= next_state_
;
184 next_state_
= STATE_NONE
;
186 case STATE_TRANSPORT_CONNECT
:
188 rv
= DoTransportConnect();
190 case STATE_TRANSPORT_CONNECT_COMPLETE
:
191 rv
= DoTransportConnectComplete(rv
);
193 case STATE_SOCKS_CONNECT
:
195 rv
= DoSOCKSConnect();
197 case STATE_SOCKS_CONNECT_COMPLETE
:
198 rv
= DoSOCKSConnectComplete(rv
);
200 case STATE_TUNNEL_CONNECT
:
202 rv
= DoTunnelConnect();
204 case STATE_TUNNEL_CONNECT_COMPLETE
:
205 rv
= DoTunnelConnectComplete(rv
);
207 case STATE_SSL_CONNECT
:
211 case STATE_SSL_CONNECT_COMPLETE
:
212 rv
= DoSSLConnectComplete(rv
);
215 NOTREACHED() << "bad state";
219 } while (rv
!= ERR_IO_PENDING
&& next_state_
!= STATE_NONE
);
224 int SSLConnectJob::DoTransportConnect() {
225 DCHECK(transport_pool_
);
227 next_state_
= STATE_TRANSPORT_CONNECT_COMPLETE
;
228 transport_socket_handle_
.reset(new ClientSocketHandle());
229 scoped_refptr
<TransportSocketParams
> direct_params
=
230 params_
->GetDirectConnectionParams();
231 return transport_socket_handle_
->Init(group_name(), direct_params
, priority(),
232 callback_
, transport_pool_
, net_log());
235 int SSLConnectJob::DoTransportConnectComplete(int result
) {
236 connection_attempts_
= transport_socket_handle_
->connection_attempts();
238 next_state_
= STATE_SSL_CONNECT
;
239 transport_socket_handle_
->socket()->GetPeerAddress(&server_address_
);
245 int SSLConnectJob::DoSOCKSConnect() {
247 next_state_
= STATE_SOCKS_CONNECT_COMPLETE
;
248 transport_socket_handle_
.reset(new ClientSocketHandle());
249 scoped_refptr
<SOCKSSocketParams
> socks_proxy_params
=
250 params_
->GetSocksProxyConnectionParams();
251 return transport_socket_handle_
->Init(group_name(), socks_proxy_params
,
252 priority(), callback_
, socks_pool_
,
256 int SSLConnectJob::DoSOCKSConnectComplete(int result
) {
258 next_state_
= STATE_SSL_CONNECT
;
263 int SSLConnectJob::DoTunnelConnect() {
264 DCHECK(http_proxy_pool_
);
265 next_state_
= STATE_TUNNEL_CONNECT_COMPLETE
;
267 transport_socket_handle_
.reset(new ClientSocketHandle());
268 scoped_refptr
<HttpProxySocketParams
> http_proxy_params
=
269 params_
->GetHttpProxyConnectionParams();
270 return transport_socket_handle_
->Init(group_name(), http_proxy_params
,
271 priority(), callback_
, http_proxy_pool_
,
275 int SSLConnectJob::DoTunnelConnectComplete(int result
) {
276 // Extract the information needed to prompt for appropriate proxy
277 // authentication so that when ClientSocketPoolBaseHelper calls
278 // |GetAdditionalErrorState|, we can easily set the state.
279 if (result
== ERR_SSL_CLIENT_AUTH_CERT_NEEDED
) {
280 error_response_info_
= transport_socket_handle_
->ssl_error_response_info();
281 } else if (result
== ERR_PROXY_AUTH_REQUESTED
||
282 result
== ERR_HTTPS_PROXY_TUNNEL_RESPONSE
) {
283 StreamSocket
* socket
= transport_socket_handle_
->socket();
284 ProxyClientSocket
* tunnel_socket
= static_cast<ProxyClientSocket
*>(socket
);
285 error_response_info_
= *tunnel_socket
->GetConnectResponseInfo();
290 next_state_
= STATE_SSL_CONNECT
;
294 int SSLConnectJob::DoSSLConnect() {
295 // TODO(pkasting): Remove ScopedTracker below once crbug.com/462815 is fixed.
296 tracked_objects::ScopedTracker
tracking_profile(
297 FROM_HERE_WITH_EXPLICIT_FUNCTION("462815 SSLConnectJob::DoSSLConnect"));
299 next_state_
= STATE_SSL_CONNECT_COMPLETE
;
301 // Reset the timeout to just the time allowed for the SSL handshake.
302 ResetTimer(base::TimeDelta::FromSeconds(kSSLHandshakeTimeoutInSeconds
));
304 // If the handle has a fresh socket, get its connect start and DNS times.
305 // This should always be the case.
306 const LoadTimingInfo::ConnectTiming
& socket_connect_timing
=
307 transport_socket_handle_
->connect_timing();
308 if (!transport_socket_handle_
->is_reused() &&
309 !socket_connect_timing
.connect_start
.is_null()) {
310 // Overwriting |connect_start| serves two purposes - it adjusts timing so
311 // |connect_start| doesn't include dns times, and it adjusts the time so
312 // as not to include time spent waiting for an idle socket.
313 connect_timing_
.connect_start
= socket_connect_timing
.connect_start
;
314 connect_timing_
.dns_start
= socket_connect_timing
.dns_start
;
315 connect_timing_
.dns_end
= socket_connect_timing
.dns_end
;
318 connect_timing_
.ssl_start
= base::TimeTicks::Now();
320 ssl_socket_
= client_socket_factory_
->CreateSSLClientSocket(
321 transport_socket_handle_
.Pass(),
322 params_
->host_and_port(),
323 params_
->ssl_config(),
325 return ssl_socket_
->Connect(callback_
);
328 int SSLConnectJob::DoSSLConnectComplete(int result
) {
329 // TODO(rvargas): Remove ScopedTracker below once crbug.com/462784 is fixed.
330 tracked_objects::ScopedTracker
tracking_profile(
331 FROM_HERE_WITH_EXPLICIT_FUNCTION(
332 "462784 SSLConnectJob::DoSSLConnectComplete"));
334 connect_timing_
.ssl_end
= base::TimeTicks::Now();
336 if (result
!= OK
&& !server_address_
.address().empty()) {
337 connection_attempts_
.push_back(ConnectionAttempt(server_address_
, result
));
338 server_address_
= IPEndPoint();
341 // If we want SPDY over ALPN/NPN, make sure it succeeded.
342 if (params_
->expect_spdy() &&
343 !NextProtoIsSPDY(ssl_socket_
->GetNegotiatedProtocol())) {
344 return ERR_NPN_NEGOTIATION_FAILED
;
348 ssl_socket_
->IgnoreCertError(result
, params_
->load_flags())) {
349 DCHECK(!connect_timing_
.ssl_start
.is_null());
350 base::TimeDelta connect_duration
=
351 connect_timing_
.ssl_end
- connect_timing_
.ssl_start
;
352 if (params_
->expect_spdy()) {
353 UMA_HISTOGRAM_CUSTOM_TIMES("Net.SpdyConnectionLatency_2",
355 base::TimeDelta::FromMilliseconds(1),
356 base::TimeDelta::FromMinutes(1),
360 UMA_HISTOGRAM_CUSTOM_TIMES("Net.SSL_Connection_Latency_2",
362 base::TimeDelta::FromMilliseconds(1),
363 base::TimeDelta::FromMinutes(1),
367 bool has_ssl_info
= ssl_socket_
->GetSSLInfo(&ssl_info
);
368 DCHECK(has_ssl_info
);
370 UMA_HISTOGRAM_ENUMERATION("Net.SSLVersion", SSLConnectionStatusToVersion(
371 ssl_info
.connection_status
),
372 SSL_CONNECTION_VERSION_MAX
);
374 UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SSL_CipherSuite",
375 SSLConnectionStatusToCipherSuite(
376 ssl_info
.connection_status
));
378 if (ssl_info
.handshake_type
== SSLInfo::HANDSHAKE_RESUME
) {
379 UMA_HISTOGRAM_CUSTOM_TIMES("Net.SSL_Connection_Latency_Resume_Handshake",
381 base::TimeDelta::FromMilliseconds(1),
382 base::TimeDelta::FromMinutes(1),
384 } else if (ssl_info
.handshake_type
== SSLInfo::HANDSHAKE_FULL
) {
385 UMA_HISTOGRAM_CUSTOM_TIMES("Net.SSL_Connection_Latency_Full_Handshake",
387 base::TimeDelta::FromMilliseconds(1),
388 base::TimeDelta::FromMinutes(1),
392 const std::string
& host
= params_
->host_and_port().host();
394 host
== "google.com" ||
395 (host
.size() > 11 && host
.rfind(".google.com") == host
.size() - 11);
397 UMA_HISTOGRAM_CUSTOM_TIMES("Net.SSL_Connection_Latency_Google2",
399 base::TimeDelta::FromMilliseconds(1),
400 base::TimeDelta::FromMinutes(1),
402 if (ssl_info
.handshake_type
== SSLInfo::HANDSHAKE_RESUME
) {
403 UMA_HISTOGRAM_CUSTOM_TIMES("Net.SSL_Connection_Latency_Google_"
406 base::TimeDelta::FromMilliseconds(1),
407 base::TimeDelta::FromMinutes(1),
409 } else if (ssl_info
.handshake_type
== SSLInfo::HANDSHAKE_FULL
) {
410 UMA_HISTOGRAM_CUSTOM_TIMES("Net.SSL_Connection_Latency_Google_"
413 base::TimeDelta::FromMilliseconds(1),
414 base::TimeDelta::FromMinutes(1),
420 UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SSL_Connection_Error", std::abs(result
));
422 if (result
== OK
|| IsCertificateError(result
)) {
423 SetSocket(ssl_socket_
.Pass());
424 } else if (result
== ERR_SSL_CLIENT_AUTH_CERT_NEEDED
) {
425 error_response_info_
.cert_request_info
= new SSLCertRequestInfo
;
426 ssl_socket_
->GetSSLCertRequestInfo(
427 error_response_info_
.cert_request_info
.get());
433 SSLConnectJob::State
SSLConnectJob::GetInitialState(
434 SSLSocketParams::ConnectionType connection_type
) {
435 switch (connection_type
) {
436 case SSLSocketParams::DIRECT
:
437 return STATE_TRANSPORT_CONNECT
;
438 case SSLSocketParams::HTTP_PROXY
:
439 return STATE_TUNNEL_CONNECT
;
440 case SSLSocketParams::SOCKS_PROXY
:
441 return STATE_SOCKS_CONNECT
;
447 int SSLConnectJob::ConnectInternal() {
448 next_state_
= GetInitialState(params_
->GetConnectionType());
452 SSLClientSocketPool::SSLConnectJobFactory::SSLConnectJobFactory(
453 TransportClientSocketPool
* transport_pool
,
454 SOCKSClientSocketPool
* socks_pool
,
455 HttpProxyClientSocketPool
* http_proxy_pool
,
456 ClientSocketFactory
* client_socket_factory
,
457 const SSLClientSocketContext
& context
,
459 : transport_pool_(transport_pool
),
460 socks_pool_(socks_pool
),
461 http_proxy_pool_(http_proxy_pool
),
462 client_socket_factory_(client_socket_factory
),
465 base::TimeDelta max_transport_timeout
= base::TimeDelta();
466 base::TimeDelta pool_timeout
;
468 max_transport_timeout
= transport_pool_
->ConnectionTimeout();
470 pool_timeout
= socks_pool_
->ConnectionTimeout();
471 if (pool_timeout
> max_transport_timeout
)
472 max_transport_timeout
= pool_timeout
;
474 if (http_proxy_pool_
) {
475 pool_timeout
= http_proxy_pool_
->ConnectionTimeout();
476 if (pool_timeout
> max_transport_timeout
)
477 max_transport_timeout
= pool_timeout
;
479 timeout_
= max_transport_timeout
+
480 base::TimeDelta::FromSeconds(kSSLHandshakeTimeoutInSeconds
);
483 SSLClientSocketPool::SSLConnectJobFactory::~SSLConnectJobFactory() {
486 SSLClientSocketPool::SSLClientSocketPool(
488 int max_sockets_per_group
,
489 CertVerifier
* cert_verifier
,
490 ChannelIDService
* channel_id_service
,
491 TransportSecurityState
* transport_security_state
,
492 CTVerifier
* cert_transparency_verifier
,
493 CertPolicyEnforcer
* cert_policy_enforcer
,
494 const std::string
& ssl_session_cache_shard
,
495 ClientSocketFactory
* client_socket_factory
,
496 TransportClientSocketPool
* transport_pool
,
497 SOCKSClientSocketPool
* socks_pool
,
498 HttpProxyClientSocketPool
* http_proxy_pool
,
499 SSLConfigService
* ssl_config_service
,
501 : transport_pool_(transport_pool
),
502 socks_pool_(socks_pool
),
503 http_proxy_pool_(http_proxy_pool
),
506 max_sockets_per_group
,
507 ClientSocketPool::unused_idle_socket_timeout(),
508 ClientSocketPool::used_idle_socket_timeout(),
509 new SSLConnectJobFactory(
513 client_socket_factory
,
514 SSLClientSocketContext(cert_verifier
,
516 transport_security_state
,
517 cert_transparency_verifier
,
518 cert_policy_enforcer
,
519 ssl_session_cache_shard
),
521 ssl_config_service_(ssl_config_service
) {
522 if (ssl_config_service_
.get())
523 ssl_config_service_
->AddObserver(this);
525 base_
.AddLowerLayeredPool(transport_pool_
);
527 base_
.AddLowerLayeredPool(socks_pool_
);
528 if (http_proxy_pool_
)
529 base_
.AddLowerLayeredPool(http_proxy_pool_
);
532 SSLClientSocketPool::~SSLClientSocketPool() {
533 if (ssl_config_service_
.get())
534 ssl_config_service_
->RemoveObserver(this);
537 scoped_ptr
<ConnectJob
> SSLClientSocketPool::SSLConnectJobFactory::NewConnectJob(
538 const std::string
& group_name
,
539 const PoolBase::Request
& request
,
540 ConnectJob::Delegate
* delegate
) const {
541 return scoped_ptr
<ConnectJob
>(new SSLConnectJob(group_name
,
548 client_socket_factory_
,
554 base::TimeDelta
SSLClientSocketPool::SSLConnectJobFactory::ConnectionTimeout()
559 int SSLClientSocketPool::RequestSocket(const std::string
& group_name
,
560 const void* socket_params
,
561 RequestPriority priority
,
562 ClientSocketHandle
* handle
,
563 const CompletionCallback
& callback
,
564 const BoundNetLog
& net_log
) {
565 const scoped_refptr
<SSLSocketParams
>* casted_socket_params
=
566 static_cast<const scoped_refptr
<SSLSocketParams
>*>(socket_params
);
568 return base_
.RequestSocket(group_name
, *casted_socket_params
, priority
,
569 handle
, callback
, net_log
);
572 void SSLClientSocketPool::RequestSockets(
573 const std::string
& group_name
,
576 const BoundNetLog
& net_log
) {
577 const scoped_refptr
<SSLSocketParams
>* casted_params
=
578 static_cast<const scoped_refptr
<SSLSocketParams
>*>(params
);
580 base_
.RequestSockets(group_name
, *casted_params
, num_sockets
, net_log
);
583 void SSLClientSocketPool::CancelRequest(const std::string
& group_name
,
584 ClientSocketHandle
* handle
) {
585 base_
.CancelRequest(group_name
, handle
);
588 void SSLClientSocketPool::ReleaseSocket(const std::string
& group_name
,
589 scoped_ptr
<StreamSocket
> socket
,
591 base_
.ReleaseSocket(group_name
, socket
.Pass(), id
);
594 void SSLClientSocketPool::FlushWithError(int error
) {
595 base_
.FlushWithError(error
);
598 void SSLClientSocketPool::CloseIdleSockets() {
599 base_
.CloseIdleSockets();
602 int SSLClientSocketPool::IdleSocketCount() const {
603 return base_
.idle_socket_count();
606 int SSLClientSocketPool::IdleSocketCountInGroup(
607 const std::string
& group_name
) const {
608 return base_
.IdleSocketCountInGroup(group_name
);
611 LoadState
SSLClientSocketPool::GetLoadState(
612 const std::string
& group_name
, const ClientSocketHandle
* handle
) const {
613 return base_
.GetLoadState(group_name
, handle
);
616 scoped_ptr
<base::DictionaryValue
> SSLClientSocketPool::GetInfoAsValue(
617 const std::string
& name
,
618 const std::string
& type
,
619 bool include_nested_pools
) const {
620 scoped_ptr
<base::DictionaryValue
> dict(base_
.GetInfoAsValue(name
, type
));
621 if (include_nested_pools
) {
622 base::ListValue
* list
= new base::ListValue();
623 if (transport_pool_
) {
624 list
->Append(transport_pool_
->GetInfoAsValue("transport_socket_pool",
625 "transport_socket_pool",
629 list
->Append(socks_pool_
->GetInfoAsValue("socks_pool",
633 if (http_proxy_pool_
) {
634 list
->Append(http_proxy_pool_
->GetInfoAsValue("http_proxy_pool",
638 dict
->Set("nested_pools", list
);
643 base::TimeDelta
SSLClientSocketPool::ConnectionTimeout() const {
644 return base_
.ConnectionTimeout();
647 bool SSLClientSocketPool::IsStalled() const {
648 return base_
.IsStalled();
651 void SSLClientSocketPool::AddHigherLayeredPool(HigherLayeredPool
* higher_pool
) {
652 base_
.AddHigherLayeredPool(higher_pool
);
655 void SSLClientSocketPool::RemoveHigherLayeredPool(
656 HigherLayeredPool
* higher_pool
) {
657 base_
.RemoveHigherLayeredPool(higher_pool
);
660 bool SSLClientSocketPool::CloseOneIdleConnection() {
661 if (base_
.CloseOneIdleSocket())
663 return base_
.CloseOneIdleConnectionInHigherLayeredPool();
666 void SSLClientSocketPool::OnSSLConfigChanged() {
667 FlushWithError(ERR_NETWORK_CHANGED
);