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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 request_extra_headers.GetHeader(HttpRequestHeaders::kUserAgent, | 174 request_extra_headers.GetHeader(HttpRequestHeaders::kUserAgent, |
175 &user_agent); | 175 &user_agent); |
176 scoped_refptr<SSLSocketParams> ssl_params; | 176 scoped_refptr<SSLSocketParams> ssl_params; |
177 if (proxy_info.is_https()) { | 177 if (proxy_info.is_https()) { |
178 // Set ssl_params, and unset proxy_tcp_params | 178 // Set ssl_params, and unset proxy_tcp_params |
179 ssl_params = new SSLSocketParams(proxy_tcp_params, | 179 ssl_params = new SSLSocketParams(proxy_tcp_params, |
180 NULL, | 180 NULL, |
181 NULL, | 181 NULL, |
182 *proxy_host_port.get(), | 182 *proxy_host_port.get(), |
183 ssl_config_for_proxy, | 183 ssl_config_for_proxy, |
184 kPrivacyModeDisabled, | 184 PRIVACY_MODE_DISABLED, |
185 load_flags, | 185 load_flags, |
186 force_spdy_over_ssl, | 186 force_spdy_over_ssl, |
187 want_spdy_over_npn); | 187 want_spdy_over_npn); |
188 proxy_tcp_params = NULL; | 188 proxy_tcp_params = NULL; |
189 } | 189 } |
190 | 190 |
191 http_proxy_params = | 191 http_proxy_params = |
192 new HttpProxySocketParams(proxy_tcp_params, | 192 new HttpProxySocketParams(proxy_tcp_params, |
193 ssl_params, | 193 ssl_params, |
194 request_url, | 194 request_url, |
(...skipping 13 matching lines...) Expand all Loading... |
208 connection_group = base::StringPrintf( | 208 connection_group = base::StringPrintf( |
209 "socks%c/%s", socks_version, connection_group.c_str()); | 209 "socks%c/%s", socks_version, connection_group.c_str()); |
210 | 210 |
211 socks_params = new SOCKSSocketParams(proxy_tcp_params, | 211 socks_params = new SOCKSSocketParams(proxy_tcp_params, |
212 socks_version == '5', | 212 socks_version == '5', |
213 origin_host_port); | 213 origin_host_port); |
214 } | 214 } |
215 } | 215 } |
216 | 216 |
217 // Change group name if privacy mode is enabled. | 217 // Change group name if privacy mode is enabled. |
218 if (privacy_mode == kPrivacyModeEnabled) | 218 if (privacy_mode == PRIVACY_MODE_ENABLED) |
219 connection_group = "pm/" + connection_group; | 219 connection_group = "pm/" + connection_group; |
220 | 220 |
221 // Deal with SSL - which layers on top of any given proxy. | 221 // Deal with SSL - which layers on top of any given proxy. |
222 if (using_ssl) { | 222 if (using_ssl) { |
223 scoped_refptr<SSLSocketParams> ssl_params = | 223 scoped_refptr<SSLSocketParams> ssl_params = |
224 new SSLSocketParams(tcp_params, | 224 new SSLSocketParams(tcp_params, |
225 socks_params, | 225 socks_params, |
226 http_proxy_params, | 226 http_proxy_params, |
227 origin_host_port, | 227 origin_host_port, |
228 ssl_config_for_origin, | 228 ssl_config_for_origin, |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 int num_preconnect_streams) { | 477 int num_preconnect_streams) { |
478 return InitSocketPoolHelper( | 478 return InitSocketPoolHelper( |
479 request_url, request_extra_headers, request_load_flags, request_priority, | 479 request_url, request_extra_headers, request_load_flags, request_priority, |
480 session, proxy_info, force_spdy_over_ssl, want_spdy_over_npn, | 480 session, proxy_info, force_spdy_over_ssl, want_spdy_over_npn, |
481 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, |
482 num_preconnect_streams, NULL, HttpNetworkSession::NORMAL_SOCKET_POOL, | 482 num_preconnect_streams, NULL, HttpNetworkSession::NORMAL_SOCKET_POOL, |
483 OnHostResolutionCallback(), CompletionCallback()); | 483 OnHostResolutionCallback(), CompletionCallback()); |
484 } | 484 } |
485 | 485 |
486 } // namespace net | 486 } // namespace net |
OLD | NEW |