Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: net/socket/ssl_client_socket_pool.cc

Issue 8692012: net: replace DnsRRResoler with TransportSecurityState in plumbing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/socket/ssl_client_socket_pool.h ('k') | net/socket/ssl_host_info.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "net/socket/ssl_client_socket_pool.h" 5 #include "net/socket/ssl_client_socket_pool.h"
6 6
7 #include "base/metrics/field_trial.h" 7 #include "base/metrics/field_trial.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 DCHECK(transport_pool_); 187 DCHECK(transport_pool_);
188 188
189 if (context_.ssl_host_info_factory) { 189 if (context_.ssl_host_info_factory) {
190 ssl_host_info_.reset( 190 ssl_host_info_.reset(
191 context_.ssl_host_info_factory->GetForHost( 191 context_.ssl_host_info_factory->GetForHost(
192 params_->host_and_port().host(), 192 params_->host_and_port().host(),
193 params_->ssl_config())); 193 params_->ssl_config()));
194 } 194 }
195 195
196 if (ssl_host_info_.get()) { 196 if (ssl_host_info_.get()) {
197 if (context_.dnsrr_resolver)
198 ssl_host_info_->StartDnsLookup(context_.dnsrr_resolver);
199
200 // This starts fetching the SSL host info from the disk cache for early 197 // This starts fetching the SSL host info from the disk cache for early
201 // certificate verification and the TLS cached information extension. 198 // certificate verification and the TLS cached information extension.
202 ssl_host_info_->Start(); 199 ssl_host_info_->Start();
203 } 200 }
204 201
205 next_state_ = STATE_TRANSPORT_CONNECT_COMPLETE; 202 next_state_ = STATE_TRANSPORT_CONNECT_COMPLETE;
206 transport_socket_handle_.reset(new ClientSocketHandle()); 203 transport_socket_handle_.reset(new ClientSocketHandle());
207 scoped_refptr<TransportSocketParams> transport_params = 204 scoped_refptr<TransportSocketParams> transport_params =
208 params_->transport_params(); 205 params_->transport_params();
209 return transport_socket_handle_->Init( 206 return transport_socket_handle_->Init(
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 base::TimeDelta::FromSeconds(kSSLHandshakeTimeoutInSeconds); 437 base::TimeDelta::FromSeconds(kSSLHandshakeTimeoutInSeconds);
441 } 438 }
442 439
443 SSLClientSocketPool::SSLClientSocketPool( 440 SSLClientSocketPool::SSLClientSocketPool(
444 int max_sockets, 441 int max_sockets,
445 int max_sockets_per_group, 442 int max_sockets_per_group,
446 ClientSocketPoolHistograms* histograms, 443 ClientSocketPoolHistograms* histograms,
447 HostResolver* host_resolver, 444 HostResolver* host_resolver,
448 CertVerifier* cert_verifier, 445 CertVerifier* cert_verifier,
449 OriginBoundCertService* origin_bound_cert_service, 446 OriginBoundCertService* origin_bound_cert_service,
450 DnsRRResolver* dnsrr_resolver, 447 TransportSecurityState* transport_security_state,
451 DnsCertProvenanceChecker* dns_cert_checker, 448 DnsCertProvenanceChecker* dns_cert_checker,
452 SSLHostInfoFactory* ssl_host_info_factory, 449 SSLHostInfoFactory* ssl_host_info_factory,
453 ClientSocketFactory* client_socket_factory, 450 ClientSocketFactory* client_socket_factory,
454 TransportClientSocketPool* transport_pool, 451 TransportClientSocketPool* transport_pool,
455 SOCKSClientSocketPool* socks_pool, 452 SOCKSClientSocketPool* socks_pool,
456 HttpProxyClientSocketPool* http_proxy_pool, 453 HttpProxyClientSocketPool* http_proxy_pool,
457 SSLConfigService* ssl_config_service, 454 SSLConfigService* ssl_config_service,
458 NetLog* net_log) 455 NetLog* net_log)
459 : transport_pool_(transport_pool), 456 : transport_pool_(transport_pool),
460 socks_pool_(socks_pool), 457 socks_pool_(socks_pool),
461 http_proxy_pool_(http_proxy_pool), 458 http_proxy_pool_(http_proxy_pool),
462 base_(max_sockets, max_sockets_per_group, histograms, 459 base_(max_sockets, max_sockets_per_group, histograms,
463 ClientSocketPool::unused_idle_socket_timeout(), 460 ClientSocketPool::unused_idle_socket_timeout(),
464 ClientSocketPool::used_idle_socket_timeout(), 461 ClientSocketPool::used_idle_socket_timeout(),
465 new SSLConnectJobFactory(transport_pool, 462 new SSLConnectJobFactory(transport_pool,
466 socks_pool, 463 socks_pool,
467 http_proxy_pool, 464 http_proxy_pool,
468 client_socket_factory, 465 client_socket_factory,
469 host_resolver, 466 host_resolver,
470 SSLClientSocketContext( 467 SSLClientSocketContext(
471 cert_verifier, 468 cert_verifier,
472 origin_bound_cert_service, 469 origin_bound_cert_service,
473 dnsrr_resolver, 470 transport_security_state,
474 dns_cert_checker, 471 dns_cert_checker,
475 ssl_host_info_factory), 472 ssl_host_info_factory),
476 net_log)), 473 net_log)),
477 ssl_config_service_(ssl_config_service) { 474 ssl_config_service_(ssl_config_service) {
478 if (ssl_config_service_) 475 if (ssl_config_service_)
479 ssl_config_service_->AddObserver(this); 476 ssl_config_service_->AddObserver(this);
480 } 477 }
481 478
482 SSLClientSocketPool::~SSLClientSocketPool() { 479 SSLClientSocketPool::~SSLClientSocketPool() {
483 if (ssl_config_service_) 480 if (ssl_config_service_)
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 580
584 ClientSocketPoolHistograms* SSLClientSocketPool::histograms() const { 581 ClientSocketPoolHistograms* SSLClientSocketPool::histograms() const {
585 return base_.histograms(); 582 return base_.histograms();
586 } 583 }
587 584
588 void SSLClientSocketPool::OnSSLConfigChanged() { 585 void SSLClientSocketPool::OnSSLConfigChanged() {
589 Flush(); 586 Flush();
590 } 587 }
591 588
592 } // namespace net 589 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_pool.h ('k') | net/socket/ssl_host_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698