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/client_socket_pool_manager.h" | 5 #include "net/socket/client_socket_pool_manager.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 // All connections in a group should use the same SSLConfig settings. | 125 // All connections in a group should use the same SSLConfig settings. |
126 // Encode version_max in the connection group's name, unless it's the | 126 // Encode version_max in the connection group's name, unless it's the |
127 // default version_max. (We want the common case to use the shortest | 127 // default version_max. (We want the common case to use the shortest |
128 // encoding). A version_max of TLS 1.1 is encoded as "ssl(max:3.2)/" | 128 // encoding). A version_max of TLS 1.1 is encoded as "ssl(max:3.2)/" |
129 // rather than "tlsv1.1/" because the actual protocol version, which | 129 // rather than "tlsv1.1/" because the actual protocol version, which |
130 // is selected by the server, may not be TLS 1.1. Do not encode | 130 // is selected by the server, may not be TLS 1.1. Do not encode |
131 // version_min in the connection group's name because version_min | 131 // version_min in the connection group's name because version_min |
132 // should be the same for all connections, whereas version_max may | 132 // should be the same for all connections, whereas version_max may |
133 // change for version fallbacks. | 133 // change for version fallbacks. |
134 std::string prefix = "ssl/"; | 134 std::string prefix = "ssl/"; |
135 if (ssl_config_for_origin.version_max != | 135 if (ssl_config_for_origin.version_max != net::kDefaultSSLVersionMax) { |
136 SSLConfigService::default_version_max()) { | |
137 switch (ssl_config_for_origin.version_max) { | 136 switch (ssl_config_for_origin.version_max) { |
138 case SSL_PROTOCOL_VERSION_TLS1_2: | 137 case SSL_PROTOCOL_VERSION_TLS1_2: |
139 prefix = "ssl(max:3.3)/"; | 138 prefix = "ssl(max:3.3)/"; |
140 break; | 139 break; |
141 case SSL_PROTOCOL_VERSION_TLS1_1: | 140 case SSL_PROTOCOL_VERSION_TLS1_1: |
142 prefix = "ssl(max:3.2)/"; | 141 prefix = "ssl(max:3.2)/"; |
143 break; | 142 break; |
144 case SSL_PROTOCOL_VERSION_TLS1: | 143 case SSL_PROTOCOL_VERSION_TLS1: |
145 prefix = "ssl(max:3.1)/"; | 144 prefix = "ssl(max:3.1)/"; |
146 break; | 145 break; |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 int num_preconnect_streams) { | 477 int num_preconnect_streams) { |
479 return InitSocketPoolHelper( | 478 return InitSocketPoolHelper( |
480 request_url, request_extra_headers, request_load_flags, request_priority, | 479 request_url, request_extra_headers, request_load_flags, request_priority, |
481 session, proxy_info, force_spdy_over_ssl, want_spdy_over_npn, | 480 session, proxy_info, force_spdy_over_ssl, want_spdy_over_npn, |
482 ssl_config_for_origin, ssl_config_for_proxy, false, privacy_mode, net_log, | 481 ssl_config_for_origin, ssl_config_for_proxy, false, privacy_mode, net_log, |
483 num_preconnect_streams, NULL, HttpNetworkSession::NORMAL_SOCKET_POOL, | 482 num_preconnect_streams, NULL, HttpNetworkSession::NORMAL_SOCKET_POOL, |
484 OnHostResolutionCallback(), CompletionCallback()); | 483 OnHostResolutionCallback(), CompletionCallback()); |
485 } | 484 } |
486 | 485 |
487 } // namespace net | 486 } // namespace net |
OLD | NEW |