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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 resolution_callback, | 149 resolution_callback, |
150 combine_connect_and_write); | 150 combine_connect_and_write); |
151 // Set ssl_params, and unset proxy_tcp_params | 151 // Set ssl_params, and unset proxy_tcp_params |
152 ssl_params = | 152 ssl_params = |
153 new SSLSocketParams(proxy_tcp_params, NULL, NULL, | 153 new SSLSocketParams(proxy_tcp_params, NULL, NULL, |
154 *proxy_host_port.get(), ssl_config_for_proxy, | 154 *proxy_host_port.get(), ssl_config_for_proxy, |
155 PRIVACY_MODE_DISABLED, load_flags, expect_spdy); | 155 PRIVACY_MODE_DISABLED, load_flags, expect_spdy); |
156 proxy_tcp_params = NULL; | 156 proxy_tcp_params = NULL; |
157 } | 157 } |
158 | 158 |
159 http_proxy_params = | 159 http_proxy_params = new HttpProxySocketParams( |
160 new HttpProxySocketParams(proxy_tcp_params, | 160 proxy_tcp_params, ssl_params, user_agent, origin_host_port, |
161 ssl_params, | 161 session->http_auth_cache(), session->http_auth_handler_factory(), |
162 user_agent, | 162 session->spdy_session_pool(), force_tunnel || using_ssl, |
163 origin_host_port, | 163 session->context().proxy_delegate); |
164 session->http_auth_cache(), | |
165 session->http_auth_handler_factory(), | |
166 session->spdy_session_pool(), | |
167 force_tunnel || using_ssl, | |
168 session->params().proxy_delegate); | |
169 } else { | 164 } else { |
170 DCHECK(proxy_info.is_socks()); | 165 DCHECK(proxy_info.is_socks()); |
171 char socks_version; | 166 char socks_version; |
172 if (proxy_server.scheme() == ProxyServer::SCHEME_SOCKS5) | 167 if (proxy_server.scheme() == ProxyServer::SCHEME_SOCKS5) |
173 socks_version = '5'; | 168 socks_version = '5'; |
174 else | 169 else |
175 socks_version = '4'; | 170 socks_version = '4'; |
176 connection_group = base::StringPrintf( | 171 connection_group = base::StringPrintf( |
177 "socks%c/%s", socks_version, connection_group.c_str()); | 172 "socks%c/%s", socks_version, connection_group.c_str()); |
178 | 173 |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 int num_preconnect_streams) { | 443 int num_preconnect_streams) { |
449 return InitSocketPoolHelper( | 444 return InitSocketPoolHelper( |
450 group_type, endpoint, request_extra_headers, request_load_flags, | 445 group_type, endpoint, request_extra_headers, request_load_flags, |
451 request_priority, session, proxy_info, expect_spdy, ssl_config_for_origin, | 446 request_priority, session, proxy_info, expect_spdy, ssl_config_for_origin, |
452 ssl_config_for_proxy, /*force_tunnel=*/false, privacy_mode, net_log, | 447 ssl_config_for_proxy, /*force_tunnel=*/false, privacy_mode, net_log, |
453 num_preconnect_streams, NULL, HttpNetworkSession::NORMAL_SOCKET_POOL, | 448 num_preconnect_streams, NULL, HttpNetworkSession::NORMAL_SOCKET_POOL, |
454 OnHostResolutionCallback(), CompletionCallback()); | 449 OnHostResolutionCallback(), CompletionCallback()); |
455 } | 450 } |
456 | 451 |
457 } // namespace net | 452 } // namespace net |
OLD | NEW |