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 "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "net/base/load_flags.h" | 9 #include "net/base/load_flags.h" |
10 #include "net/http/http_proxy_client_socket_pool.h" | 10 #include "net/http/http_proxy_client_socket_pool.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
107 // Determine the host and port to connect to. | 107 // Determine the host and port to connect to. |
108 std::string connection_group = origin_host_port.ToString(); | 108 std::string connection_group = origin_host_port.ToString(); |
109 DCHECK(!connection_group.empty()); | 109 DCHECK(!connection_group.empty()); |
110 if (group_type == ClientSocketPoolManager::FTP_GROUP) { | 110 if (group_type == ClientSocketPoolManager::FTP_GROUP) { |
111 // Combining FTP with forced SPDY over SSL would be a "path to madness". | 111 // Combining FTP with forced SPDY over SSL would be a "path to madness". |
112 // Make sure we never do that. | 112 // Make sure we never do that. |
113 DCHECK(!using_ssl); | 113 DCHECK(!using_ssl); |
114 connection_group = "ftp/" + connection_group; | 114 connection_group = "ftp/" + connection_group; |
115 } | 115 } |
116 if (using_ssl) { | 116 if (using_ssl) { |
117 std::string prefix = "ssl/"; | 117 connection_group = "ssl/" + connection_group; |
davidben
2017/05/09 19:04:18
There. Happy now? :-)
mmenke
2017/05/09 19:34:27
Less happy, actually, given that I didn't even kno
| |
118 // Place sockets with and without deprecated ciphers into separate | |
119 // connection groups. | |
120 if (ssl_config_for_origin.deprecated_cipher_suites_enabled) | |
121 prefix += "deprecatedciphers/"; | |
122 connection_group = prefix + connection_group; | |
123 } | 118 } |
124 | 119 |
125 ClientSocketPool::RespectLimits respect_limits = | 120 ClientSocketPool::RespectLimits respect_limits = |
126 ClientSocketPool::RespectLimits::ENABLED; | 121 ClientSocketPool::RespectLimits::ENABLED; |
127 if ((request_load_flags & LOAD_IGNORE_LIMITS) != 0) | 122 if ((request_load_flags & LOAD_IGNORE_LIMITS) != 0) |
128 respect_limits = ClientSocketPool::RespectLimits::DISABLED; | 123 respect_limits = ClientSocketPool::RespectLimits::DISABLED; |
129 if (!proxy_info.is_direct()) { | 124 if (!proxy_info.is_direct()) { |
130 ProxyServer proxy_server = proxy_info.proxy_server(); | 125 ProxyServer proxy_server = proxy_info.proxy_server(); |
131 proxy_host_port.reset(new HostPortPair(proxy_server.host_port_pair())); | 126 proxy_host_port.reset(new HostPortPair(proxy_server.host_port_pair())); |
132 scoped_refptr<TransportSocketParams> proxy_tcp_params( | 127 scoped_refptr<TransportSocketParams> proxy_tcp_params( |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
453 int num_preconnect_streams) { | 448 int num_preconnect_streams) { |
454 return InitSocketPoolHelper( | 449 return InitSocketPoolHelper( |
455 group_type, endpoint, request_extra_headers, request_load_flags, | 450 group_type, endpoint, request_extra_headers, request_load_flags, |
456 request_priority, session, proxy_info, expect_spdy, ssl_config_for_origin, | 451 request_priority, session, proxy_info, expect_spdy, ssl_config_for_origin, |
457 ssl_config_for_proxy, /*force_tunnel=*/false, privacy_mode, net_log, | 452 ssl_config_for_proxy, /*force_tunnel=*/false, privacy_mode, net_log, |
458 num_preconnect_streams, NULL, HttpNetworkSession::NORMAL_SOCKET_POOL, | 453 num_preconnect_streams, NULL, HttpNetworkSession::NORMAL_SOCKET_POOL, |
459 OnHostResolutionCallback(), CompletionCallback()); | 454 OnHostResolutionCallback(), CompletionCallback()); |
460 } | 455 } |
461 | 456 |
462 } // namespace net | 457 } // namespace net |
OLD | NEW |