Chromium Code Reviews| 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/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 110 std::string connection_group = origin_host_port.ToString(); | 110 std::string connection_group = origin_host_port.ToString(); |
| 111 DCHECK(!connection_group.empty()); | 111 DCHECK(!connection_group.empty()); |
| 112 if (group_type == ClientSocketPoolManager::FTP_GROUP) { | 112 if (group_type == ClientSocketPoolManager::FTP_GROUP) { |
| 113 // Combining FTP with forced SPDY over SSL would be a "path to madness". | 113 // Combining FTP with forced SPDY over SSL would be a "path to madness". |
| 114 // Make sure we never do that. | 114 // Make sure we never do that. |
| 115 DCHECK(!using_ssl); | 115 DCHECK(!using_ssl); |
| 116 connection_group = "ftp/" + connection_group; | 116 connection_group = "ftp/" + connection_group; |
| 117 } | 117 } |
| 118 if (using_ssl) { | 118 if (using_ssl) { |
| 119 std::string prefix = "ssl/"; | 119 std::string prefix = "ssl/"; |
| 120 if (ssl_config_for_origin.version_max != kDefaultSSLVersionMax) { | |
|
davidben
2016/07/18 09:46:40
Mismerge? (This was for the fallback, which is gon
svaldez
2016/07/18 10:04:01
Done.
| |
| 121 switch (ssl_config_for_origin.version_max) { | |
| 122 case SSL_PROTOCOL_VERSION_TLS1_3: | |
| 123 prefix = "ssl(max:3.4)/"; | |
| 124 break; | |
| 125 case SSL_PROTOCOL_VERSION_TLS1_2: | |
| 126 prefix = "ssl(max:3.3)/"; | |
| 127 break; | |
| 128 case SSL_PROTOCOL_VERSION_TLS1_1: | |
| 129 prefix = "ssl(max:3.2)/"; | |
| 130 break; | |
| 131 case SSL_PROTOCOL_VERSION_TLS1: | |
| 132 prefix = "ssl(max:3.1)/"; | |
| 133 break; | |
| 134 default: | |
| 135 CHECK(false); | |
| 136 break; | |
| 137 } | |
| 138 } | |
| 120 // Place sockets with and without deprecated ciphers into separate | 139 // Place sockets with and without deprecated ciphers into separate |
| 121 // connection groups. | 140 // connection groups. |
| 122 if (ssl_config_for_origin.deprecated_cipher_suites_enabled) | 141 if (ssl_config_for_origin.deprecated_cipher_suites_enabled) |
| 123 prefix += "deprecatedciphers/"; | 142 prefix += "deprecatedciphers/"; |
| 124 connection_group = prefix + connection_group; | 143 connection_group = prefix + connection_group; |
| 125 } | 144 } |
| 126 | 145 |
| 127 ClientSocketPool::RespectLimits respect_limits = | 146 ClientSocketPool::RespectLimits respect_limits = |
| 128 ClientSocketPool::RespectLimits::ENABLED; | 147 ClientSocketPool::RespectLimits::ENABLED; |
| 129 if ((request_load_flags & LOAD_IGNORE_LIMITS) != 0) | 148 if ((request_load_flags & LOAD_IGNORE_LIMITS) != 0) |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 456 int num_preconnect_streams) { | 475 int num_preconnect_streams) { |
| 457 return InitSocketPoolHelper( | 476 return InitSocketPoolHelper( |
| 458 group_type, endpoint, request_extra_headers, request_load_flags, | 477 group_type, endpoint, request_extra_headers, request_load_flags, |
| 459 request_priority, session, proxy_info, expect_spdy, ssl_config_for_origin, | 478 request_priority, session, proxy_info, expect_spdy, ssl_config_for_origin, |
| 460 ssl_config_for_proxy, /*force_tunnel=*/false, privacy_mode, net_log, | 479 ssl_config_for_proxy, /*force_tunnel=*/false, privacy_mode, net_log, |
| 461 num_preconnect_streams, NULL, HttpNetworkSession::NORMAL_SOCKET_POOL, | 480 num_preconnect_streams, NULL, HttpNetworkSession::NORMAL_SOCKET_POOL, |
| 462 OnHostResolutionCallback(), CompletionCallback()); | 481 OnHostResolutionCallback(), CompletionCallback()); |
| 463 } | 482 } |
| 464 | 483 |
| 465 } // namespace net | 484 } // namespace net |
| OLD | NEW |