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

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

Issue 8857002: net: split the SSL session cache between incognito and normal. (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
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/client_socket_pool_manager_impl.h" 5 #include "net/socket/client_socket_pool_manager_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "net/base/ssl_config_service.h" 9 #include "net/base/ssl_config_service.h"
10 #include "net/http/http_proxy_client_socket_pool.h" 10 #include "net/http/http_proxy_client_socket_pool.h"
(...skipping 23 matching lines...) Expand all
34 34
35 ClientSocketPoolManagerImpl::ClientSocketPoolManagerImpl( 35 ClientSocketPoolManagerImpl::ClientSocketPoolManagerImpl(
36 NetLog* net_log, 36 NetLog* net_log,
37 ClientSocketFactory* socket_factory, 37 ClientSocketFactory* socket_factory,
38 HostResolver* host_resolver, 38 HostResolver* host_resolver,
39 CertVerifier* cert_verifier, 39 CertVerifier* cert_verifier,
40 OriginBoundCertService* origin_bound_cert_service, 40 OriginBoundCertService* origin_bound_cert_service,
41 TransportSecurityState* transport_security_state, 41 TransportSecurityState* transport_security_state,
42 DnsCertProvenanceChecker* dns_cert_checker, 42 DnsCertProvenanceChecker* dns_cert_checker,
43 SSLHostInfoFactory* ssl_host_info_factory, 43 SSLHostInfoFactory* ssl_host_info_factory,
44 const std::string& ssl_session_cache_shard,
44 ProxyService* proxy_service, 45 ProxyService* proxy_service,
45 SSLConfigService* ssl_config_service) 46 SSLConfigService* ssl_config_service)
46 : net_log_(net_log), 47 : net_log_(net_log),
47 socket_factory_(socket_factory), 48 socket_factory_(socket_factory),
48 host_resolver_(host_resolver), 49 host_resolver_(host_resolver),
49 cert_verifier_(cert_verifier), 50 cert_verifier_(cert_verifier),
50 origin_bound_cert_service_(origin_bound_cert_service), 51 origin_bound_cert_service_(origin_bound_cert_service),
51 transport_security_state_(transport_security_state), 52 transport_security_state_(transport_security_state),
52 dns_cert_checker_(dns_cert_checker), 53 dns_cert_checker_(dns_cert_checker),
53 ssl_host_info_factory_(ssl_host_info_factory), 54 ssl_host_info_factory_(ssl_host_info_factory),
55 ssl_session_cache_shard_(ssl_session_cache_shard),
54 proxy_service_(proxy_service), 56 proxy_service_(proxy_service),
55 ssl_config_service_(ssl_config_service), 57 ssl_config_service_(ssl_config_service),
56 transport_pool_histograms_("TCP"), 58 transport_pool_histograms_("TCP"),
57 transport_socket_pool_(new TransportClientSocketPool( 59 transport_socket_pool_(new TransportClientSocketPool(
58 max_sockets_per_pool(), max_sockets_per_group(), 60 max_sockets_per_pool(), max_sockets_per_group(),
59 &transport_pool_histograms_, 61 &transport_pool_histograms_,
60 host_resolver, 62 host_resolver,
61 socket_factory_, 63 socket_factory_,
62 net_log)), 64 net_log)),
63 ssl_pool_histograms_("SSL2"), 65 ssl_pool_histograms_("SSL2"),
64 ssl_socket_pool_(new SSLClientSocketPool( 66 ssl_socket_pool_(new SSLClientSocketPool(
65 max_sockets_per_pool(), max_sockets_per_group(), 67 max_sockets_per_pool(), max_sockets_per_group(),
66 &ssl_pool_histograms_, 68 &ssl_pool_histograms_,
67 host_resolver, 69 host_resolver,
68 cert_verifier, 70 cert_verifier,
69 origin_bound_cert_service, 71 origin_bound_cert_service,
70 transport_security_state, 72 transport_security_state,
71 dns_cert_checker, 73 dns_cert_checker,
72 ssl_host_info_factory, 74 ssl_host_info_factory,
75 ssl_session_cache_shard,
73 socket_factory, 76 socket_factory,
74 transport_socket_pool_.get(), 77 transport_socket_pool_.get(),
75 NULL /* no socks proxy */, 78 NULL /* no socks proxy */,
76 NULL /* no http proxy */, 79 NULL /* no http proxy */,
77 ssl_config_service, 80 ssl_config_service,
78 net_log)), 81 net_log)),
79 transport_for_socks_pool_histograms_("TCPforSOCKS"), 82 transport_for_socks_pool_histograms_("TCPforSOCKS"),
80 socks_pool_histograms_("SOCK"), 83 socks_pool_histograms_("SOCK"),
81 transport_for_http_proxy_pool_histograms_("TCPforHTTPProxy"), 84 transport_for_http_proxy_pool_histograms_("TCPforHTTPProxy"),
82 transport_for_https_proxy_pool_histograms_("TCPforHTTPSProxy"), 85 transport_for_https_proxy_pool_histograms_("TCPforHTTPSProxy"),
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 new SSLClientSocketPool( 286 new SSLClientSocketPool(
284 max_sockets_per_proxy_server(), 287 max_sockets_per_proxy_server(),
285 max_sockets_per_group(), 288 max_sockets_per_group(),
286 &ssl_for_https_proxy_pool_histograms_, 289 &ssl_for_https_proxy_pool_histograms_,
287 host_resolver_, 290 host_resolver_,
288 cert_verifier_, 291 cert_verifier_,
289 origin_bound_cert_service_, 292 origin_bound_cert_service_,
290 transport_security_state_, 293 transport_security_state_,
291 dns_cert_checker_, 294 dns_cert_checker_,
292 ssl_host_info_factory_, 295 ssl_host_info_factory_,
296 ssl_session_cache_shard_,
293 socket_factory_, 297 socket_factory_,
294 tcp_https_ret.first->second /* https proxy */, 298 tcp_https_ret.first->second /* https proxy */,
295 NULL /* no socks proxy */, 299 NULL /* no socks proxy */,
296 NULL /* no http proxy */, 300 NULL /* no http proxy */,
297 ssl_config_service_, net_log_))); 301 ssl_config_service_, net_log_)));
298 DCHECK(tcp_https_ret.second); 302 DCHECK(tcp_https_ret.second);
299 303
300 std::pair<HTTPProxySocketPoolMap::iterator, bool> ret = 304 std::pair<HTTPProxySocketPoolMap::iterator, bool> ret =
301 http_proxy_socket_pools_.insert( 305 http_proxy_socket_pools_.insert(
302 std::make_pair( 306 std::make_pair(
(...skipping 19 matching lines...) Expand all
322 326
323 SSLClientSocketPool* new_pool = new SSLClientSocketPool( 327 SSLClientSocketPool* new_pool = new SSLClientSocketPool(
324 max_sockets_per_proxy_server(), max_sockets_per_group(), 328 max_sockets_per_proxy_server(), max_sockets_per_group(),
325 &ssl_pool_histograms_, 329 &ssl_pool_histograms_,
326 host_resolver_, 330 host_resolver_,
327 cert_verifier_, 331 cert_verifier_,
328 origin_bound_cert_service_, 332 origin_bound_cert_service_,
329 transport_security_state_, 333 transport_security_state_,
330 dns_cert_checker_, 334 dns_cert_checker_,
331 ssl_host_info_factory_, 335 ssl_host_info_factory_,
336 ssl_session_cache_shard_,
332 socket_factory_, 337 socket_factory_,
333 NULL, /* no tcp pool, we always go through a proxy */ 338 NULL, /* no tcp pool, we always go through a proxy */
334 GetSocketPoolForSOCKSProxy(proxy_server), 339 GetSocketPoolForSOCKSProxy(proxy_server),
335 GetSocketPoolForHTTPProxy(proxy_server), 340 GetSocketPoolForHTTPProxy(proxy_server),
336 ssl_config_service_, 341 ssl_config_service_,
337 net_log_); 342 net_log_);
338 343
339 std::pair<SSLSocketPoolMap::iterator, bool> ret = 344 std::pair<SSLSocketPoolMap::iterator, bool> ret =
340 ssl_socket_pools_for_proxies_.insert(std::make_pair(proxy_server, 345 ssl_socket_pools_for_proxies_.insert(std::make_pair(proxy_server,
341 new_pool)); 346 new_pool));
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 // We should not flush the socket pools if we added trust to a 390 // We should not flush the socket pools if we added trust to a
386 // cert. 391 // cert.
387 // 392 //
388 // Since the OnCertTrustChanged method doesn't tell us what 393 // Since the OnCertTrustChanged method doesn't tell us what
389 // kind of trust change it is, we have to flush the socket 394 // kind of trust change it is, we have to flush the socket
390 // pools to be safe. 395 // pools to be safe.
391 FlushSocketPools(); 396 FlushSocketPools();
392 } 397 }
393 398
394 } // namespace net 399 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698