summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authormbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-25 05:17:24 +0000
committermbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-25 05:17:24 +0000
commitf90a3a5ed5749ed6201e1aa76a4616bae015aa54 (patch)
tree76e47701fd35bcb7fc39e77509d82c06c8b2be14 /chrome
parent3cf7021b2b93156be37361f82adf90e024c48765 (diff)
downloadchromium_src-f90a3a5ed5749ed6201e1aa76a4616bae015aa54.zip
chromium_src-f90a3a5ed5749ed6201e1aa76a4616bae015aa54.tar.gz
chromium_src-f90a3a5ed5749ed6201e1aa76a4616bae015aa54.tar.bz2
Temporary fix to reduce the spdy concurrent streams to 6.
Add command-line override for testers that don't want the throttle. BUG=60369 TEST= Review URL: http://codereview.chromium.org/3977007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63709 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/browser_main.cc9
-rw-r--r--chrome/common/chrome_switches.cc3
-rw-r--r--chrome/common/chrome_switches.h1
3 files changed, 13 insertions, 0 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index eb1ce609..92a3b68 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -93,6 +93,7 @@
#include "net/http/http_stream_factory.h"
#include "net/socket/client_socket_pool_base.h"
#include "net/socket/client_socket_pool_manager.h"
+#include "net/spdy/spdy_session.h"
#include "net/spdy/spdy_session_pool.h"
#if defined(USE_LINUX_BREAKPAD)
@@ -358,6 +359,14 @@ void BrowserMainParts::SpdyFieldTrial() {
CHECK(!is_spdy_trial);
}
}
+ if (parsed_command_line().HasSwitch(switches::kMaxSpdyConcurrentStreams)) {
+ int value = 0;
+ base::StringToInt(parsed_command_line().GetSwitchValueASCII(
+ switches::kMaxSpdyConcurrentStreams),
+ &value);
+ if (value > 0)
+ net::SpdySession::set_max_concurrent_streams(value);
+ }
}
// If neither --enable-content-prefetch or --disable-content-prefetch
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 9847a38..1698f3d 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -1056,6 +1056,9 @@ const char kIgnoreCertificateErrors[] = "ignore-certificate-errors";
// Set the maximum SPDY sessions per domain.
const char kMaxSpdySessionsPerDomain[] = "max-spdy-sessions-per-domain";
+// Set the maximum concurrent streams over a SPDY session.
+const char kMaxSpdyConcurrentStreams[] = "max-spdy-concurrent-streams";
+
// Grant unlimited quota to store files to this process.
// Used for testing Pepper's FileRef/FileIO/FileSystem implementations.
// DO NOT USE FOR OTHER PURPOSES.
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index 14e3ae3..20a9521 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -298,6 +298,7 @@ extern const char kUninstall[];
extern const char kUseSpdy[];
extern const char kIgnoreCertificateErrors[];
extern const char kMaxSpdySessionsPerDomain[];
+extern const char kMaxSpdyConcurrentStreams[];
extern const char kUnlimitedQuotaForFiles[];
extern const char kUseLowFragHeapCrt[];
extern const char kUserAgent[];