From 63bf966c829d04878c3012cd221a27f1ea44b7d8 Mon Sep 17 00:00:00 2001 From: "akalin@chromium.org" Date: Tue, 5 Mar 2013 20:46:01 +0000 Subject: [SPDY] Add flag to turn on SPDY/3.1 (with per-session flow control) Add SPDY/3.1 info for NPN and Alternate-Protocol. BUG=176592 TBR=jam@chromium.org Review URL: https://codereview.chromium.org/12388099 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186250 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/io_thread.cc | 14 +++++--------- chrome/common/chrome_switches.cc | 3 +++ chrome/common/chrome_switches.h | 1 + 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'chrome') diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc index 2bbc475..c69d77d 100644 --- a/chrome/browser/io_thread.cc +++ b/chrome/browser/io_thread.cc @@ -649,24 +649,20 @@ void IOThread::InitializeNetworkOptions(const CommandLine& command_line) { if (command_line.HasSwitch(switches::kIgnoreUrlFetcherCertRequests)) net::URLFetcher::SetIgnoreCertificateRequests(true); - bool used_spdy_switch = false; if (command_line.HasSwitch(switches::kUseSpdy)) { std::string spdy_mode = command_line.GetSwitchValueASCII(switches::kUseSpdy); EnableSpdy(spdy_mode); - used_spdy_switch = true; - } - if (command_line.HasSwitch(switches::kEnableSpdy3)) { + } else if (command_line.HasSwitch(switches::kEnableSpdy31)) { + net::HttpStreamFactory::EnableNpnSpdy31(); + } else if (command_line.HasSwitch(switches::kEnableSpdy3)) { net::HttpStreamFactory::EnableNpnSpdy3(); - used_spdy_switch = true; } else if (command_line.HasSwitch(switches::kEnableNpn)) { net::HttpStreamFactory::EnableNpnSpdy(); - used_spdy_switch = true; } else if (command_line.HasSwitch(switches::kEnableNpnHttpOnly)) { net::HttpStreamFactory::EnableNpnHttpOnly(); - used_spdy_switch = true; - } - if (!used_spdy_switch) { + } else { + // Use SPDY/3 by default. net::HttpStreamFactory::EnableNpnSpdy3(); } } diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index b85012e..505d1a7 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -622,6 +622,9 @@ const char kEnableSdch[] = "enable-sdch"; // Enable SPDY/3. This is a temporary testing flag. const char kEnableSpdy3[] = "enable-spdy3"; +// Enable SPDY/3.1. This is a temporary testing flag. +const char kEnableSpdy31[] = "enable-spdy31"; + // Enable SPDY CREDENTIAL frame support. This is a temporary testing flag. const char kEnableSpdyCredentialFrames[] = "enable-spdy-credential-frames"; diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index 75989fe..5a9173e 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -175,6 +175,7 @@ extern const char kEnableQueryExtraction[]; extern const char kEnableResourceContentSettings[]; extern const char kEnableSdch[]; extern const char kEnableSpdy3[]; +extern const char kEnableSpdy31[]; extern const char kEnableSpdyCredentialFrames[]; extern const char kEnableSpellingAutoCorrect[]; extern const char kEnableStackedTabStrip[]; -- cgit v1.1