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/socket/ssl_client_socket_pool.h" | 5 #include "net/socket/ssl_client_socket_pool.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 params_(params), | 117 params_(params), |
118 transport_pool_(transport_pool), | 118 transport_pool_(transport_pool), |
119 socks_pool_(socks_pool), | 119 socks_pool_(socks_pool), |
120 http_proxy_pool_(http_proxy_pool), | 120 http_proxy_pool_(http_proxy_pool), |
121 client_socket_factory_(client_socket_factory), | 121 client_socket_factory_(client_socket_factory), |
122 host_resolver_(host_resolver), | 122 host_resolver_(host_resolver), |
123 context_(context.cert_verifier, | 123 context_(context.cert_verifier, |
124 context.server_bound_cert_service, | 124 context.server_bound_cert_service, |
125 context.transport_security_state, | 125 context.transport_security_state, |
126 context.cert_transparency_verifier, | 126 context.cert_transparency_verifier, |
127 (params->privacy_mode() == PRIVACY_MODE_ENABLED | 127 (params->privacy_mode() == kPrivacyModeEnabled |
128 ? "pm/" + context.ssl_session_cache_shard | 128 ? "pm/" + context.ssl_session_cache_shard |
129 : context.ssl_session_cache_shard)), | 129 : context.ssl_session_cache_shard)), |
130 callback_(base::Bind(&SSLConnectJob::OnIOComplete, | 130 callback_(base::Bind(&SSLConnectJob::OnIOComplete, |
131 base::Unretained(this))) {} | 131 base::Unretained(this))) {} |
132 | 132 |
133 SSLConnectJob::~SSLConnectJob() {} | 133 SSLConnectJob::~SSLConnectJob() {} |
134 | 134 |
135 LoadState SSLConnectJob::GetLoadState() const { | 135 LoadState SSLConnectJob::GetLoadState() const { |
136 switch (next_state_) { | 136 switch (next_state_) { |
137 case STATE_TUNNEL_CONNECT_COMPLETE: | 137 case STATE_TUNNEL_CONNECT_COMPLETE: |
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 if (base_.CloseOneIdleSocket()) | 677 if (base_.CloseOneIdleSocket()) |
678 return true; | 678 return true; |
679 return base_.CloseOneIdleConnectionInHigherLayeredPool(); | 679 return base_.CloseOneIdleConnectionInHigherLayeredPool(); |
680 } | 680 } |
681 | 681 |
682 void SSLClientSocketPool::OnSSLConfigChanged() { | 682 void SSLClientSocketPool::OnSSLConfigChanged() { |
683 FlushWithError(ERR_NETWORK_CHANGED); | 683 FlushWithError(ERR_NETWORK_CHANGED); |
684 } | 684 } |
685 | 685 |
686 } // namespace net | 686 } // namespace net |
OLD | NEW |