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

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: Silly file deleted. 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: chrome/browser/io_thread.cc
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index d055905183c0c87199ed2c58cad7d1e4a2daba0f..4109850b005c3776160b7cdaf0acd867755a85e7 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -115,6 +115,8 @@ class SafeBrowsingURLRequestContext;
namespace {
+const char kTCPFastOpenForSSLFieldTrialName[] = "TCPFastOpenEnabledForSSL";
+
const char kQuicFieldTrialName[] = "QUIC";
const char kQuicFieldTrialEnabledGroupName[] = "Enabled";
const char kQuicFieldTrialHttpsEnabledGroupName[] = "HttpsEnabled";
@@ -839,13 +841,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(kTCPFastOpenForSSLFieldTrialName);
+ if (trial_group == kTCPFastOpenForSSLFieldTrialName)
+ globals_->enable_tcp_fast_open_for_ssl.set(true);
Randy Smith (Not in Mondays) 2014/09/10 18:57:06 This looks wrong to me--it looks like you're confl
Jana 2014/09/11 20:04:59 Yes, you are right -- I had conflated these things
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 +1024,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);

Powered by Google App Engine
This is Rietveld 408576698