diff options
author | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-25 02:29:06 +0000 |
---|---|---|
committer | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-25 02:29:06 +0000 |
commit | 6b3f964f5de20d1d5d567bf67d16f5b246ac0299 (patch) | |
tree | dc0061b10ce3b9a3e52a2eb2e9784d1bad141da8 /net/base/net_error_list.h | |
parent | 9b41006d15b05b373724cce02c8b458cf173c9b9 (diff) | |
download | chromium_src-6b3f964f5de20d1d5d567bf67d16f5b246ac0299.zip chromium_src-6b3f964f5de20d1d5d567bf67d16f5b246ac0299.tar.gz chromium_src-6b3f964f5de20d1d5d567bf67d16f5b246ac0299.tar.bz2 |
Implement exponential back-off mechanism.
Contributed by yzshen@google.com, original review http://codereview.chromium.org/4194001/
Implement exponential back-off mechanism. Enforce it at the URLRequestHttpJob level for all outgoing HTTP requests.
The reason why to make this change is that we need back-off logic at a lower enough level to manage all outgoing HTTP traffic, so that the browser won't cause any DDoS attack.
This change:
1) patches http://codereview.chromium.org/2487001/show, which is the exponential back-off implementation.
2) resolves conflicts with URLFetcher, by removing its own back-off logic:
-- removes url_fetcher_protect.{h,cc};
-- integrates the sliding window mechanism of URLFetcherProtectEntry into RequestThrottlerEntry.
3) resolves conflicts with CloudPrintURLFetcher.
4) makes unit tests of CloudPrintURLFetcher, URLFetcher and URLRequest work.
BUG=none
TEST=pass all existing tests and also the newly-added request_throttler_unittest.cc
Review URL: http://codereview.chromium.org/5276007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67375 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/net_error_list.h')
-rw-r--r-- | net/base/net_error_list.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/base/net_error_list.h b/net/base/net_error_list.h index 96b19ad..2998a46 100644 --- a/net/base/net_error_list.h +++ b/net/base/net_error_list.h @@ -210,6 +210,9 @@ NET_ERROR(NAME_RESOLUTION_FAILED, -137) // errors. See also ERR_ACCESS_DENIED. NET_ERROR(NETWORK_ACCESS_DENIED, -138) +// The request throttler module cancelled this request to avoid DDOS. +NET_ERROR(TEMPORARILY_THROTTLED, -139) + // Certificate error codes // // The values of certificate error codes must be consecutive. |