| 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(
|
| + ¶ms->enable_tcp_fast_open_for_ssl);
|
|
|
| globals.initial_max_spdy_concurrent_streams.CopyToIfSet(
|
| ¶ms->spdy_initial_max_concurrent_streams);
|
|
|