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

Unified Diff: chrome/browser/io_thread.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 | « chrome/browser/io_thread.h ('k') | net/http/http_network_session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/io_thread.cc
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index d055905183c0c87199ed2c58cad7d1e4a2daba0f..18e1a65054b2993f7388cf0695ab517bda589695 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -115,6 +115,9 @@ class SafeBrowsingURLRequestContext;
namespace {
+const char kTCPFastOpenFieldTrialName[] = "TCPFastOpen";
+const char kTCPFastOpenHttpsEnabledGroupName[] = "HttpsEnabled";
+
const char kQuicFieldTrialName[] = "QUIC";
const char kQuicFieldTrialEnabledGroupName[] = "Enabled";
const char kQuicFieldTrialHttpsEnabledGroupName[] = "HttpsEnabled";
@@ -839,13 +842,21 @@ void IOThread::InitializeNetworkOptions(const CommandLine& command_line) {
globals_->enable_websocket_over_spdy.set(true);
}
+ ConfigureTCPFastOpen(command_line);
+
// TODO(rch): Make the client socket factory a per-network session
// instance, constructed from a NetworkSession::Params, to allow us
// to move this option to IOThread::Globals &
// HttpNetworkSession::Params.
+}
+void IOThread::ConfigureTCPFastOpen(const CommandLine& command_line) {
+ const std::string trial_group =
+ base::FieldTrialList::FindFullName(kTCPFastOpenFieldTrialName);
+ if (trial_group == kTCPFastOpenHttpsEnabledGroupName)
+ globals_->enable_tcp_fast_open_for_ssl.set(true);
bool always_enable_if_supported =
- command_line.HasSwitch(switches::kEnableTcpFastOpen);
+ command_line.HasSwitch(switches::kEnableTcpFastOpen);
// Check for OS support of TCP FastOpen, and turn it on for all connections
// if indicated by user.
net::CheckSupportAndMaybeEnableTCPFastOpen(always_enable_if_supported);
@@ -1014,6 +1025,8 @@ void IOThread::InitializeNetworkSessionParamsFromGlobals(
params->ignore_certificate_errors = globals.ignore_certificate_errors;
params->testing_fixed_http_port = globals.testing_fixed_http_port;
params->testing_fixed_https_port = globals.testing_fixed_https_port;
+ globals.enable_tcp_fast_open_for_ssl.CopyToIfSet(
+ &params->enable_tcp_fast_open_for_ssl);
globals.initial_max_spdy_concurrent_streams.CopyToIfSet(
&params->spdy_initial_max_concurrent_streams);
« no previous file with comments | « chrome/browser/io_thread.h ('k') | net/http/http_network_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698