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

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: Fixing linker error for Windows. 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/net.gypi ('k') | net/socket/deterministic_socket_data_unittest.cc » ('j') | 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 08fc487c3b0481587a5baf3cd357ac5d6dfd3401..a11965caab3567c9de671e5d6861e4a77ee2e185 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,16 @@ 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));
+ new TransportSocketParams(
+ *proxy_host_port,
+ disable_resolver_cache,
+ ignore_limits,
+ resolution_callback,
+ TransportSocketParams::COMBINE_CONNECT_AND_WRITE_DEFAULT));
if (proxy_info.is_http() || proxy_info.is_https()) {
std::string user_agent;
@@ -175,6 +171,15 @@ 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);
// Set ssl_params, and unset proxy_tcp_params
ssl_params = new SSLSocketParams(proxy_tcp_params,
NULL,
@@ -221,8 +226,21 @@ 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
+ // 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);
+ }
scoped_refptr<SSLSocketParams> ssl_params =
- new SSLSocketParams(tcp_params,
+ new SSLSocketParams(ssl_tcp_params,
socks_params,
http_proxy_params,
origin_host_port,
@@ -281,7 +299,13 @@ 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,
+ TransportSocketParams::COMBINE_CONNECT_AND_WRITE_DEFAULT);
TransportClientSocketPool* pool =
session->GetTransportSocketPool(socket_pool_type);
if (num_preconnect_streams) {
« no previous file with comments | « net/net.gypi ('k') | net/socket/deterministic_socket_data_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698