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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 HttpNetworkSession::SocketPoolType socket_pool_type, | 84 HttpNetworkSession::SocketPoolType socket_pool_type, |
85 const OnHostResolutionCallback& resolution_callback, | 85 const OnHostResolutionCallback& resolution_callback, |
86 const CompletionCallback& callback) { | 86 const CompletionCallback& callback) { |
87 scoped_refptr<HttpProxySocketParams> http_proxy_params; | 87 scoped_refptr<HttpProxySocketParams> http_proxy_params; |
88 scoped_refptr<SOCKSSocketParams> socks_params; | 88 scoped_refptr<SOCKSSocketParams> socks_params; |
89 scoped_ptr<HostPortPair> proxy_host_port; | 89 scoped_ptr<HostPortPair> proxy_host_port; |
90 | 90 |
91 bool using_ssl = request_url.SchemeIs("https") || | 91 bool using_ssl = request_url.SchemeIs("https") || |
92 request_url.SchemeIs("wss") || force_spdy_over_ssl; | 92 request_url.SchemeIs("wss") || force_spdy_over_ssl; |
93 | 93 |
94 HostPortPair origin_host_port = | 94 HostPortPair origin_host_port = HostPortPair::FromURL(request_url); |
95 HostPortPair(request_url.HostNoBrackets(), | |
96 request_url.EffectiveIntPort()); | |
97 | 95 |
98 if (!using_ssl && session->params().testing_fixed_http_port != 0) { | 96 if (!using_ssl && session->params().testing_fixed_http_port != 0) { |
99 origin_host_port.set_port(session->params().testing_fixed_http_port); | 97 origin_host_port.set_port(session->params().testing_fixed_http_port); |
100 } else if (using_ssl && session->params().testing_fixed_https_port != 0) { | 98 } else if (using_ssl && session->params().testing_fixed_https_port != 0) { |
101 origin_host_port.set_port(session->params().testing_fixed_https_port); | 99 origin_host_port.set_port(session->params().testing_fixed_https_port); |
102 } | 100 } |
103 | 101 |
104 bool disable_resolver_cache = | 102 bool disable_resolver_cache = |
105 request_load_flags & LOAD_BYPASS_CACHE || | 103 request_load_flags & LOAD_BYPASS_CACHE || |
106 request_load_flags & LOAD_VALIDATE_CACHE || | 104 request_load_flags & LOAD_VALIDATE_CACHE || |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 int num_preconnect_streams) { | 505 int num_preconnect_streams) { |
508 return InitSocketPoolHelper( | 506 return InitSocketPoolHelper( |
509 request_url, request_extra_headers, request_load_flags, request_priority, | 507 request_url, request_extra_headers, request_load_flags, request_priority, |
510 session, proxy_info, force_spdy_over_ssl, want_spdy_over_npn, | 508 session, proxy_info, force_spdy_over_ssl, want_spdy_over_npn, |
511 ssl_config_for_origin, ssl_config_for_proxy, false, privacy_mode, net_log, | 509 ssl_config_for_origin, ssl_config_for_proxy, false, privacy_mode, net_log, |
512 num_preconnect_streams, NULL, HttpNetworkSession::NORMAL_SOCKET_POOL, | 510 num_preconnect_streams, NULL, HttpNetworkSession::NORMAL_SOCKET_POOL, |
513 OnHostResolutionCallback(), CompletionCallback()); | 511 OnHostResolutionCallback(), CompletionCallback()); |
514 } | 512 } |
515 | 513 |
516 } // namespace net | 514 } // namespace net |
OLD | NEW |