Chromium Code Reviews| Index: chrome/browser/io_thread.cc |
| diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc |
| index d2745b3148316620a4bde35bac99abf9b1ce5b5b..24fe62220253ebe4d0823378f8d3064f730cf266 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)); |
| @@ -711,6 +714,9 @@ void IOThread::InitializeNetworkOptions(const CommandLine& command_line) { |
| if (command_line.HasSwitch(switches::kIgnoreUrlFetcherCertRequests)) |
| net::URLFetcher::SetIgnoreCertificateRequests(true); |
| + std::string spdy_trial_group = |
| + base::FieldTrialList::FindFullName(kSpdyFieldTrialName); |
| + |
| if (command_line.HasSwitch(switches::kUseSpdy)) { |
|
Alexei Svitkine (slow)
2013/09/30 19:40:13
Either add all of these flags to the config for th
motek.
2013/09/30 20:44:29
From the Department of Redundancy Department: pret
ramant (doing other things)
2013/09/30 22:28:56
Done.
ramant (doing other things)
2013/09/30 22:28:56
Done.
|
| std::string spdy_mode = |
| command_line.GetSwitchValueASCII(switches::kUseSpdy); |
| @@ -726,8 +732,12 @@ 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(); |
| + } |
| } |
| } |