diff options
author | yzshen@google.com <yzshen@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-23 02:09:39 +0000 |
---|---|---|
committer | yzshen@google.com <yzshen@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-23 02:09:39 +0000 |
commit | 05fd9e3071321bc2dec75296dff0cc4dbdef7128 (patch) | |
tree | 017c2b6114fa75c48faf9ce9cc7847386faa0d33 /chrome/browser/browser_main.cc | |
parent | 9edc6b2c8f0e0992c2f17eb5434d7c3044baff19 (diff) | |
download | chromium_src-05fd9e3071321bc2dec75296dff0cc4dbdef7128.zip chromium_src-05fd9e3071321bc2dec75296dff0cc4dbdef7128.tar.gz chromium_src-05fd9e3071321bc2dec75296dff0cc4dbdef7128.tar.bz2 |
Give user the ability to disable the URL request throttler:
- Support the command line switch --disable-enforced-throttling. With this switch specified, the URL request throttler won't reject outgoing requests during the back-off peroid. Please note that in this case we still keep track of the back-off period, since we need it to determine retry intervals.
- Add a more detailed error page description for net::ERR_TEMPORARILY_THROTTLED.
BUG=66062
TEST=Without --disable-enforced-throttling switch:
(1) Type in the addresss bar a URL which is expected to return 5XX.
(2) Keep clicking the "reload" button.
(3) After a few clicks, Chrome displays an error page explaining why a net::ERR_TEMPORARILY_THROTTLED error occurs.
With --disable-enforced-throttling switch:
Following step (1) and (2) described above won't result in a net::ERR_TEMPORARILY_THROTTLED error page.
Review URL: http://codereview.chromium.org/5961008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70022 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_main.cc')
-rw-r--r-- | chrome/browser/browser_main.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index 7f535f6..030e1ee 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -100,6 +100,7 @@ #include "net/spdy/spdy_session.h" #include "net/spdy/spdy_session_pool.h" #include "net/url_request/url_request.h" +#include "net/url_request/url_request_throttler_manager.h" #if defined(USE_LINUX_BREAKPAD) #include "base/linux_util.h" @@ -586,6 +587,11 @@ void InitializeNetworkOptions(const CommandLine& parsed_command_line) { net::SpdySessionPool::set_max_sessions_per_domain(value); } + if (parsed_command_line.HasSwitch(switches::kDisableEnforcedThrottling)) { + net::URLRequestThrottlerManager::GetInstance()-> + set_enforce_throttling(false); + } + SetDnsCertProvenanceCheckerFactory(CreateChromeDnsCertProvenanceChecker); } |