Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(236)

Unified Diff: net/socket/client_socket_pool_manager.cc

Issue 451383002: Plumbing for TCP FastOpen for SSL sockets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: TFO not enabled when Happy Eyeballs may be used. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/socket/client_socket_pool_manager.cc
diff --git a/net/socket/client_socket_pool_manager.cc b/net/socket/client_socket_pool_manager.cc
index a7bf1fe5b753bc7796b1019c7260649f06a6bc06..4bc553560d0bcb1081f2a901f24f7675c9729ab9 100644
--- a/net/socket/client_socket_pool_manager.cc
+++ b/net/socket/client_socket_pool_manager.cc
@@ -84,7 +84,6 @@ int InitSocketPoolHelper(const GURL& request_url,
HttpNetworkSession::SocketPoolType socket_pool_type,
const OnHostResolutionCallback& resolution_callback,
const CompletionCallback& callback) {
- scoped_refptr<TransportSocketParams> tcp_params;
scoped_refptr<HttpProxySocketParams> http_proxy_params;
scoped_refptr<SOCKSSocketParams> socks_params;
scoped_ptr<HostPortPair> proxy_host_port;
@@ -155,19 +154,15 @@ int InitSocketPoolHelper(const GURL& request_url,
}
bool ignore_limits = (request_load_flags & LOAD_IGNORE_LIMITS) != 0;
- if (proxy_info.is_direct()) {
- tcp_params = new TransportSocketParams(origin_host_port,
- disable_resolver_cache,
- ignore_limits,
- resolution_callback);
- } else {
+ if (!proxy_info.is_direct()) {
ProxyServer proxy_server = proxy_info.proxy_server();
proxy_host_port.reset(new HostPortPair(proxy_server.host_port_pair()));
scoped_refptr<TransportSocketParams> proxy_tcp_params(
new TransportSocketParams(*proxy_host_port,
disable_resolver_cache,
ignore_limits,
- resolution_callback));
+ resolution_callback,
+ AUTO_CONNECT_USE_DEFAULT));
if (proxy_info.is_http() || proxy_info.is_https()) {
std::string user_agent;
@@ -175,6 +170,14 @@ int InitSocketPoolHelper(const GURL& request_url,
&user_agent);
scoped_refptr<SSLSocketParams> ssl_params;
if (proxy_info.is_https()) {
+ // TODO (jri): Enable a finch trial to use AUTO_CONNECT_ENABLED
+ // for SSL sockets.
+ proxy_tcp_params =
+ new TransportSocketParams(*proxy_host_port,
+ disable_resolver_cache,
+ ignore_limits,
+ resolution_callback,
+ AUTO_CONNECT_USE_DEFAULT);
// Set ssl_params, and unset proxy_tcp_params
ssl_params = new SSLSocketParams(proxy_tcp_params,
NULL,
@@ -220,8 +223,19 @@ int InitSocketPoolHelper(const GURL& request_url,
// Deal with SSL - which layers on top of any given proxy.
if (using_ssl) {
+ scoped_refptr<TransportSocketParams> ssl_tcp_params;
+ if (proxy_info.is_direct()) {
+ // Setup TCP params if non-proxied SSL connection.
+ // TODO (jri): Enable a finch trial to use AUTO_CONNECT_ENABLED
+ // for SSL sockets.
+ ssl_tcp_params = new TransportSocketParams(origin_host_port,
+ disable_resolver_cache,
+ ignore_limits,
+ resolution_callback,
+ AUTO_CONNECT_USE_DEFAULT);
+ }
scoped_refptr<SSLSocketParams> ssl_params =
- new SSLSocketParams(tcp_params,
+ new SSLSocketParams(ssl_tcp_params,
socks_params,
http_proxy_params,
origin_host_port,
@@ -280,7 +294,12 @@ int InitSocketPoolHelper(const GURL& request_url,
}
DCHECK(proxy_info.is_direct());
-
+ scoped_refptr<TransportSocketParams> tcp_params =
+ new TransportSocketParams(origin_host_port,
+ disable_resolver_cache,
+ ignore_limits,
+ resolution_callback,
+ AUTO_CONNECT_USE_DEFAULT);
TransportClientSocketPool* pool =
session->GetTransportSocketPool(socket_pool_type);
if (num_preconnect_streams) {

Powered by Google App Engine
This is Rietveld 408576698