| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 const BoundNetLog& net_log, | 81 const BoundNetLog& net_log, |
| 82 int num_preconnect_streams, | 82 int num_preconnect_streams, |
| 83 ClientSocketHandle* socket_handle, | 83 ClientSocketHandle* socket_handle, |
| 84 const OnHostResolutionCallback& resolution_callback, | 84 const OnHostResolutionCallback& resolution_callback, |
| 85 const CompletionCallback& callback) { | 85 const CompletionCallback& callback) { |
| 86 scoped_refptr<TransportSocketParams> tcp_params; | 86 scoped_refptr<TransportSocketParams> tcp_params; |
| 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") || force_spdy_over_ssl; | 91 bool using_ssl = request_url.SchemeIs("https") || |
| 92 request_url.SchemeIs("wss") || force_spdy_over_ssl; |
| 92 | 93 |
| 93 HostPortPair origin_host_port = | 94 HostPortPair origin_host_port = |
| 94 HostPortPair(request_url.HostNoBrackets(), | 95 HostPortPair(request_url.HostNoBrackets(), |
| 95 request_url.EffectiveIntPort()); | 96 request_url.EffectiveIntPort()); |
| 96 | 97 |
| 97 if (!using_ssl && session->params().testing_fixed_http_port != 0) { | 98 if (!using_ssl && session->params().testing_fixed_http_port != 0) { |
| 98 origin_host_port.set_port(session->params().testing_fixed_http_port); | 99 origin_host_port.set_port(session->params().testing_fixed_http_port); |
| 99 } else if (using_ssl && session->params().testing_fixed_https_port != 0) { | 100 } else if (using_ssl && session->params().testing_fixed_https_port != 0) { |
| 100 origin_host_port.set_port(session->params().testing_fixed_https_port); | 101 origin_host_port.set_port(session->params().testing_fixed_https_port); |
| 101 } | 102 } |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 int num_preconnect_streams) { | 434 int num_preconnect_streams) { |
| 434 return InitSocketPoolHelper( | 435 return InitSocketPoolHelper( |
| 435 request_url, request_extra_headers, request_load_flags, request_priority, | 436 request_url, request_extra_headers, request_load_flags, request_priority, |
| 436 session, proxy_info, force_spdy_over_ssl, want_spdy_over_npn, | 437 session, proxy_info, force_spdy_over_ssl, want_spdy_over_npn, |
| 437 ssl_config_for_origin, ssl_config_for_proxy, false, privacy_mode, net_log, | 438 ssl_config_for_origin, ssl_config_for_proxy, false, privacy_mode, net_log, |
| 438 num_preconnect_streams, NULL, OnHostResolutionCallback(), | 439 num_preconnect_streams, NULL, OnHostResolutionCallback(), |
| 439 CompletionCallback()); | 440 CompletionCallback()); |
| 440 } | 441 } |
| 441 | 442 |
| 442 } // namespace net | 443 } // namespace net |
| OLD | NEW |