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/logging.h" | 9 #include "base/logging.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 bool force_tunnel, | 78 bool force_tunnel, |
79 PrivacyMode privacy_mode, | 79 PrivacyMode privacy_mode, |
80 const BoundNetLog& net_log, | 80 const BoundNetLog& net_log, |
81 int num_preconnect_streams, | 81 int num_preconnect_streams, |
82 ClientSocketHandle* socket_handle, | 82 ClientSocketHandle* socket_handle, |
83 HttpNetworkSession::SocketPoolType socket_pool_type, | 83 HttpNetworkSession::SocketPoolType socket_pool_type, |
84 const OnHostResolutionCallback& resolution_callback, | 84 const OnHostResolutionCallback& resolution_callback, |
85 const CompletionCallback& callback) { | 85 const CompletionCallback& callback) { |
86 scoped_refptr<HttpProxySocketParams> http_proxy_params; | 86 scoped_refptr<HttpProxySocketParams> http_proxy_params; |
87 scoped_refptr<SOCKSSocketParams> socks_params; | 87 scoped_refptr<SOCKSSocketParams> socks_params; |
88 scoped_ptr<HostPortPair> proxy_host_port; | 88 std::unique_ptr<HostPortPair> proxy_host_port; |
89 | 89 |
90 bool using_ssl = group_type == ClientSocketPoolManager::SSL_GROUP; | 90 bool using_ssl = group_type == ClientSocketPoolManager::SSL_GROUP; |
91 HostPortPair origin_host_port = endpoint; | 91 HostPortPair origin_host_port = endpoint; |
92 | 92 |
93 if (!using_ssl && session->params().testing_fixed_http_port != 0) { | 93 if (!using_ssl && session->params().testing_fixed_http_port != 0) { |
94 origin_host_port.set_port(session->params().testing_fixed_http_port); | 94 origin_host_port.set_port(session->params().testing_fixed_http_port); |
95 } else if (using_ssl && session->params().testing_fixed_https_port != 0) { | 95 } else if (using_ssl && session->params().testing_fixed_https_port != 0) { |
96 origin_host_port.set_port(session->params().testing_fixed_https_port); | 96 origin_host_port.set_port(session->params().testing_fixed_https_port); |
97 } | 97 } |
98 | 98 |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 int num_preconnect_streams) { | 481 int num_preconnect_streams) { |
482 return InitSocketPoolHelper( | 482 return InitSocketPoolHelper( |
483 group_type, endpoint, request_extra_headers, request_load_flags, | 483 group_type, endpoint, request_extra_headers, request_load_flags, |
484 request_priority, session, proxy_info, expect_spdy, ssl_config_for_origin, | 484 request_priority, session, proxy_info, expect_spdy, ssl_config_for_origin, |
485 ssl_config_for_proxy, /*force_tunnel=*/false, privacy_mode, net_log, | 485 ssl_config_for_proxy, /*force_tunnel=*/false, privacy_mode, net_log, |
486 num_preconnect_streams, NULL, HttpNetworkSession::NORMAL_SOCKET_POOL, | 486 num_preconnect_streams, NULL, HttpNetworkSession::NORMAL_SOCKET_POOL, |
487 OnHostResolutionCallback(), CompletionCallback()); | 487 OnHostResolutionCallback(), CompletionCallback()); |
488 } | 488 } |
489 | 489 |
490 } // namespace net | 490 } // namespace net |
OLD | NEW |