From 6b3f964f5de20d1d5d567bf67d16f5b246ac0299 Mon Sep 17 00:00:00 2001 From: "joi@chromium.org" Date: Thu, 25 Nov 2010 02:29:06 +0000 Subject: 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 --- net/net.gyp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'net/net.gyp') diff --git a/net/net.gyp b/net/net.gyp index a5b1948..a5134da 100644 --- a/net/net.gyp +++ b/net/net.gyp @@ -685,6 +685,14 @@ 'url_request/url_request_status.h', 'url_request/url_request_test_job.cc', 'url_request/url_request_test_job.h', + 'url_request/url_request_throttler_entry.cc', + 'url_request/url_request_throttler_entry.h', + 'url_request/url_request_throttler_entry_interface.h', + 'url_request/url_request_throttler_header_adapter.h', + 'url_request/url_request_throttler_header_adapter.cc', + 'url_request/url_request_throttler_header_interface.h', + 'url_request/url_request_throttler_manager.cc', + 'url_request/url_request_throttler_manager.h', 'url_request/view_cache_helper.cc', 'url_request/view_cache_helper.h', 'websockets/websocket.cc', @@ -960,6 +968,7 @@ 'tools/dump_cache/url_utilities.cc', 'tools/dump_cache/url_utilities_unittest.cc', 'url_request/url_request_job_tracker_unittest.cc', + 'url_request/url_request_throttler_unittest.cc', 'url_request/url_request_unittest.cc', 'url_request/url_request_unittest.h', 'url_request/view_cache_helper_unittest.cc', -- cgit v1.1