Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Issue 6966038: Anti-DDoS enhancements: Log to net log, UMA stats, improved policy. (Closed)

Created:
9 years, 7 months ago by Jói
Modified:
9 years, 7 months ago
CC:
chromium-reviews, pam+watch_chromium.org, cbentzel+watch_chromium.org, Paweł Hajdan Jr., darin-cc_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Anti-DDoS enhancements: Log to net log, UMA stats, improved policy. Count only certain error codes as failures. Don't count malformed body for codes already counted failures. Start with fresh entry when outdated, which makes policy slightly less aggressive. Add registration/unregistration to NetworkChangeNotifier, and reset throttling state on network changes, to avoid degenerate corner cases. Add UMA stats for throttling, and unit tests for them. Add hash-location-only URL to unit test. Enable testing of AJAX behavior via backoff_server. BUG=83775 TEST=net_unittests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=87056

Patch Set 1 #

Patch Set 2 : Remove NON_EXPORTED_BASE where not needed. #

Total comments: 28

Patch Set 3 : Respond to review comments. #

Total comments: 17

Patch Set 4 : Respond to wtc@'s review comments. #

Patch Set 5 : Merge to head. #

Total comments: 2

Patch Set 6 : Address wtc's review comment. #

Patch Set 7 : Merge to head. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+702 lines, -106 lines) Patch
M chrome/browser/browser_main.cc View 1 2 3 4 5 6 5 chunks +17 lines, -3 lines 0 comments Download
M chrome/browser/net/passive_log_collector.h View 1 2 3 2 chunks +14 lines, -0 lines 0 comments Download
M chrome/browser/net/passive_log_collector.cc View 3 chunks +26 lines, -0 lines 0 comments Download
M chrome/common/net/gaia/gaia_oauth_client.cc View 1 chunk +5 lines, -6 lines 0 comments Download
M chrome/common/net/url_fetcher.cc View 1 2 3 chunks +21 lines, -3 lines 0 comments Download
M chrome/common/net/url_fetcher_unittest.cc View 5 chunks +5 lines, -5 lines 0 comments Download
M chrome/service/cloud_print/cloud_print_url_fetcher.cc View 1 chunk +5 lines, -6 lines 0 comments Download
M chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M net/base/backoff_entry.h View 1 2 3 1 chunk +7 lines, -2 lines 0 comments Download
M net/base/backoff_entry.cc View 1 2 3 6 chunks +30 lines, -20 lines 0 comments Download
M net/base/backoff_entry_unittest.cc View 1 2 3 3 chunks +11 lines, -8 lines 0 comments Download
M net/base/net_log_event_type_list.h View 1 2 1 chunk +26 lines, -0 lines 0 comments Download
M net/base/net_log_source_type_list.h View 1 2 3 4 5 6 2 chunks +3 lines, -2 lines 0 comments Download
M net/tools/testserver/backoff_server.py View 1 2 3 4 2 chunks +67 lines, -4 lines 0 comments Download
M net/url_request/url_request_throttler_entry.h View 1 2 3 5 chunks +29 lines, -3 lines 0 comments Download
M net/url_request/url_request_throttler_entry.cc View 1 2 3 12 chunks +201 lines, -23 lines 0 comments Download
M net/url_request/url_request_throttler_entry_interface.h View 1 2 3 4 5 1 chunk +4 lines, -3 lines 0 comments Download
M net/url_request/url_request_throttler_manager.h View 1 2 3 5 chunks +33 lines, -1 line 0 comments Download
M net/url_request/url_request_throttler_manager.cc View 1 2 3 7 chunks +74 lines, -4 lines 0 comments Download
M net/url_request/url_request_throttler_unittest.cc View 1 2 16 chunks +122 lines, -11 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
Jói
Yuzhu: Please look at the whole change. Sanjeev: Please look at the changes under chrome/ ...
9 years, 7 months ago (2011-05-24 20:12:16 UTC) #1
Jói
Forgot to say: I will add a net/OWNERS reviewer once we've done an initial pass; ...
9 years, 7 months ago (2011-05-24 20:12:59 UTC) #2
sanjeevr
LGTM for chrome/ and chrome/service/ changes.
9 years, 7 months ago (2011-05-24 22:16:19 UTC) #3
yzshen1
Hi, Joi. The change of counting only certain 5xx codes as failures will potentially affect ...
9 years, 7 months ago (2011-05-25 03:49:06 UTC) #4
Jói
Wan-Teh, I'm adding you for net/OWNERS approval. Sanjeev and Yuzhu have already done one round ...
9 years, 7 months ago (2011-05-25 14:30:35 UTC) #5
yzshen1
LGTM Thanks!
9 years, 7 months ago (2011-05-25 18:45:39 UTC) #6
wtc
LGTM. I only reviewed the changes to src/net. I didn't read the histogram code and ...
9 years, 7 months ago (2011-05-25 23:12:04 UTC) #7
Jói
Thanks for the review Wan-Teh. The changes are very small, so I plan to commit ...
9 years, 7 months ago (2011-05-26 14:53:42 UTC) #8
Jói
Adding jar@ for chrome/browser/net/OWNERS approval. Cheers, Jói
9 years, 7 months ago (2011-05-26 17:04:49 UTC) #9
Jói
Wan-Teh, could you also look at the two files under chrome/browser/net files? Jim said you ...
9 years, 7 months ago (2011-05-26 23:38:57 UTC) #10
wtc
LGTM. jar: I am not an OWNER of chrome/browser/net, so you need to review those ...
9 years, 7 months ago (2011-05-27 17:35:18 UTC) #11
jar (doing other things)
Per wtc's review, I'll LGTM (approve) this assuming you fix the nit he identified. (I've ...
9 years, 7 months ago (2011-05-27 17:42:19 UTC) #12
Jói
9 years, 7 months ago (2011-05-27 18:49:10 UTC) #13
Thanks Wan-Teh and Jim.

http://codereview.chromium.org/6966038/diff/16001/net/url_request/url_request...
File net/url_request/url_request_throttler_entry_interface.h (right):

http://codereview.chromium.org/6966038/diff/16001/net/url_request/url_request...
net/url_request/url_request_throttler_entry_interface.h:55: virtual void
ReceivedContentWasMalformed(int status_code) = 0;
On 2011/05/27 17:35:19, wtc wrote:
> Nit: status_code => response_code ?

Done, sorry I thought I had caught them all before.

Powered by Google App Engine
This is Rietveld 408576698