|
|
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
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=67375
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+1358 lines, -514 lines) |
Patch |
 |
M |
chrome/browser/google/google_url_tracker.cc
|
View
|
|
3 chunks |
+5 lines, -8 lines |
0 comments
|
Download
|
 |
M |
chrome/chrome_common.gypi
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/common/net/url_fetcher.h
|
View
|
|
4 chunks |
+10 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/common/net/url_fetcher.cc
|
View
|
|
14 chunks |
+107 lines, -26 lines |
0 comments
|
Download
|
 |
M |
chrome/common/net/url_fetcher_protect.h
|
View
|
|
1 chunk |
+0 lines, -152 lines |
0 comments
|
Download
|
 |
M |
chrome/common/net/url_fetcher_protect.cc
|
View
|
|
1 chunk |
+0 lines, -180 lines |
0 comments
|
Download
|
 |
M |
chrome/common/net/url_fetcher_unittest.cc
|
View
|
|
12 chunks |
+40 lines, -36 lines |
0 comments
|
Download
|
 |
M |
chrome/service/cloud_print/cloud_print_consts.h
|
View
|
|
2 chunks |
+2 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/service/cloud_print/cloud_print_consts.cc
|
View
|
|
1 chunk |
+0 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/service/cloud_print/cloud_print_proxy_backend.cc
|
View
|
|
5 chunks |
+2 lines, -32 lines |
0 comments
|
Download
|
 |
M |
chrome/service/cloud_print/cloud_print_url_fetcher.h
|
View
|
|
3 chunks |
+4 lines, -9 lines |
0 comments
|
Download
|
 |
M |
chrome/service/cloud_print/cloud_print_url_fetcher.cc
|
View
|
|
7 chunks |
+16 lines, -26 lines |
0 comments
|
Download
|
 |
M |
chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc
|
View
|
|
9 chunks |
+26 lines, -25 lines |
0 comments
|
Download
|
 |
M |
chrome/service/cloud_print/job_status_updater.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/service/cloud_print/printer_job_handler.cc
|
View
|
|
6 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
chrome_frame/metrics_service.cc
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
net/base/net_error_list.h
|
View
|
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
net/net.gyp
|
View
|
|
2 chunks |
+9 lines, -0 lines |
0 comments
|
Download
|
 |
M |
net/url_request/url_request_http_job.h
|
View
|
|
2 chunks |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
net/url_request/url_request_http_job.cc
|
View
|
|
5 chunks |
+18 lines, -2 lines |
0 comments
|
Download
|
 |
A |
net/url_request/url_request_throttler_entry.h
|
View
|
|
1 chunk |
+157 lines, -0 lines |
0 comments
|
Download
|
 |
A |
net/url_request/url_request_throttler_entry.cc
|
View
|
|
1 chunk |
+242 lines, -0 lines |
0 comments
|
Download
|
 |
A |
net/url_request/url_request_throttler_entry_interface.h
|
View
|
|
1 chunk |
+63 lines, -0 lines |
0 comments
|
Download
|
 |
A |
net/url_request/url_request_throttler_header_adapter.h
|
View
|
|
1 chunk |
+34 lines, -0 lines |
0 comments
|
Download
|
 |
A |
net/url_request/url_request_throttler_header_adapter.cc
|
View
|
|
1 chunk |
+27 lines, -0 lines |
0 comments
|
Download
|
 |
A |
net/url_request/url_request_throttler_header_interface.h
|
View
|
|
1 chunk |
+28 lines, -0 lines |
0 comments
|
Download
|
 |
A |
net/url_request/url_request_throttler_manager.h
|
View
|
|
1 chunk |
+101 lines, -0 lines |
0 comments
|
Download
|
 |
A |
net/url_request/url_request_throttler_manager.cc
|
View
|
|
1 chunk |
+107 lines, -0 lines |
0 comments
|
Download
|
 |
A |
net/url_request/url_request_throttler_unittest.cc
|
View
|
|
1 chunk |
+346 lines, -0 lines |
0 comments
|
Download
|
|