Index: chrome/browser/io_thread.cc |
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc |
index d2745b3148316620a4bde35bac99abf9b1ce5b5b..505cc6cb4b3c62e9bea8374aac59f72ef4f3121a 100644 |
--- a/chrome/browser/io_thread.cc |
+++ b/chrome/browser/io_thread.cc |
@@ -103,6 +103,9 @@ const char kQuicFieldTrialName[] = "QUIC"; |
const char kQuicFieldTrialEnabledGroupName[] = "Enabled"; |
const char kQuicFieldTrialHttpsEnabledGroupName[] = "HttpsEnabled"; |
+const char kSpdyFieldTrialName[] = "SPDY"; |
+const char kSpdyFieldTrialDisabledGroupName[] = "SpdyDisabled"; |
+ |
#if defined(OS_MACOSX) && !defined(OS_IOS) |
void ObserveKeychainEvents() { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
@@ -686,6 +689,8 @@ void IOThread::InitializeNetworkOptions(const CommandLine& command_line) { |
// Only handle use-spdy command line flags if "spdy.disabled" preference is |
// not disabled via policy. |
if (!is_spdy_disabled_by_policy_) { |
+ std::string spdy_trial_group; |
+ |
if (command_line.HasSwitch(switches::kEnableIPPooling)) |
globals_->enable_spdy_ip_pooling.set(true); |
@@ -698,7 +703,11 @@ void IOThread::InitializeNetworkOptions(const CommandLine& command_line) { |
if (command_line.HasSwitch(switches::kEnableWebSocketOverSpdy)) { |
// Enable WebSocket over SPDY. |
net::WebSocketJob::set_websocket_over_spdy_enabled(true); |
+ } else { |
+ spdy_trial_group = |
+ base::FieldTrialList::FindFullName(kSpdyFieldTrialName); |
Alexei Svitkine (slow)
2013/10/01 13:55:31
Why is this here?
In your pending config CL, you
ramant (doing other things)
2013/10/01 17:38:18
If the command line kEnableWebSocketOverSpdy is se
|
} |
+ |
if (command_line.HasSwitch(switches::kMaxSpdyConcurrentStreams)) { |
globals_->max_spdy_concurrent_streams_limit.set( |
GetSwitchValueAsInt(command_line, |
@@ -726,9 +735,17 @@ void IOThread::InitializeNetworkOptions(const CommandLine& command_line) { |
} else if (command_line.HasSwitch(switches::kEnableNpnHttpOnly)) { |
net::HttpStreamFactory::EnableNpnHttpOnly(); |
} else { |
- // Use SPDY/3.1 by default. |
- net::HttpStreamFactory::EnableNpnSpdy31(); |
+ if (spdy_trial_group == kSpdyFieldTrialDisabledGroupName) { |
+ net::HttpStreamFactory::set_spdy_enabled(false); |
+ } else { |
+ // Use SPDY/3.1 by default. |
+ net::HttpStreamFactory::EnableNpnSpdy31(); |
+ } |
} |
+ } else { |
+ base::FieldTrial* trial = base::FieldTrialList::Find(kSpdyFieldTrialName); |
Alexei Svitkine (slow)
2013/10/01 13:55:31
Nit: I'd negate the conditional and put this at th
ramant (doing other things)
2013/10/01 17:38:18
Negated the check.
Done.
|
+ if (trial) |
+ trial->Disable(); |
} |
// TODO(rch): Make the client socket factory a per-network session |