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

Unified Diff: net/socket/client_socket_pool_manager.cc

Issue 557373002: Plumbing for TCP FastOpen field trial and enables it for SSL sockets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tfo2
Patch Set: Added a field trial group name. 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
« no previous file with comments | « net/http/http_network_session.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7b64ffb2d0315f7e8477001473f46739ab0d03b4..8bfe47c7c58965ec4a0e537df0e08b4ab6cee61b 100644
--- a/net/socket/client_socket_pool_manager.cc
+++ b/net/socket/client_socket_pool_manager.cc
@@ -171,15 +171,18 @@ 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
- // COMBINE_CONNECT_AND_WRITE_DESIRED for SSL sockets.
- proxy_tcp_params =
- new TransportSocketParams(
- *proxy_host_port,
- disable_resolver_cache,
- ignore_limits,
- resolution_callback,
- TransportSocketParams::COMBINE_CONNECT_AND_WRITE_DEFAULT);
+ // Combine connect and write for SSL sockets in TCP FastOpen
+ // field trial.
+ TransportSocketParams::CombineConnectAndWritePolicy
+ combine_connect_and_write =
+ session->params().enable_tcp_fast_open_for_ssl ?
+ TransportSocketParams::COMBINE_CONNECT_AND_WRITE_DESIRED :
+ TransportSocketParams::COMBINE_CONNECT_AND_WRITE_DEFAULT;
+ proxy_tcp_params = new TransportSocketParams(*proxy_host_port,
+ disable_resolver_cache,
+ ignore_limits,
+ resolution_callback,
+ combine_connect_and_write);
// Set ssl_params, and unset proxy_tcp_params
ssl_params = new SSLSocketParams(proxy_tcp_params,
NULL,
@@ -228,15 +231,17 @@ int InitSocketPoolHelper(const GURL& request_url,
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
- // COMBINE_CONNECT_AND_WRITE_DESIRED for SSL sockets.
- ssl_tcp_params =
- new TransportSocketParams(
- origin_host_port,
- disable_resolver_cache,
- ignore_limits,
- resolution_callback,
- TransportSocketParams::COMBINE_CONNECT_AND_WRITE_DEFAULT);
+ // Combine connect and write for SSL sockets in TCP FastOpen field trial.
+ TransportSocketParams::CombineConnectAndWritePolicy
+ combine_connect_and_write =
+ session->params().enable_tcp_fast_open_for_ssl ?
+ TransportSocketParams::COMBINE_CONNECT_AND_WRITE_DESIRED :
+ TransportSocketParams::COMBINE_CONNECT_AND_WRITE_DEFAULT;
+ ssl_tcp_params = new TransportSocketParams(origin_host_port,
+ disable_resolver_cache,
+ ignore_limits,
+ resolution_callback,
+ combine_connect_and_write);
}
scoped_refptr<SSLSocketParams> ssl_params =
new SSLSocketParams(ssl_tcp_params,
« no previous file with comments | « net/http/http_network_session.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698