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

Issue 6711046: Add an opt-out header for HTTP throttling. Never throttle for localhost. (Closed)

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

Description

Add an opt-out header for HTTP throttling. Never throttle for localhost. Added net::IsLocalhost() function to net/base/net_utils.h Unit tests for the above. Also fix flakiness in the ReceivedContentMalformed test that was caused by non-zero jitter. Modify back-off policy to ignore first 4 errors to help avoid back-off from erroneously kicking in on flaky connections. Make maximum back-off period 15 minutes instead of 60. Added documentation of results of analyzing behavior this new policy will give. Add a simple server for manual testing of the throttling feature. BUG=66062 TEST=net_unittests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=79464

Patch Set 1 #

Patch Set 2 : Update copyright years. #

Total comments: 30

Patch Set 3 : Respond to review comments. #

Patch Set 4 : Fix a couple of external unit tests. #

Patch Set 5 : Merge to lkgr #

Total comments: 2

Patch Set 6 : Respond to review comments. #

Total comments: 8

Patch Set 7 : Address wtc's second round of review comments. #

Patch Set 8 : Merge to head. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+436 lines, -65 lines) Patch
M chrome/common/net/url_fetcher_unittest.cc View 1 2 5 chunks +23 lines, -15 lines 0 comments Download
M chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc View 1 2 3 3 chunks +10 lines, -9 lines 0 comments Download
M net/base/net_util.h View 1 2 3 4 5 6 7 1 chunk +8 lines, -0 lines 0 comments Download
M net/base/net_util.cc View 1 2 3 4 5 6 7 1 chunk +34 lines, -0 lines 1 comment Download
M net/base/net_util_unittest.cc View 1 2 3 4 5 6 7 1 chunk +28 lines, -0 lines 0 comments Download
A net/tools/testserver/backoff_server.py View 1 2 3 4 5 6 1 chunk +51 lines, -0 lines 0 comments Download
M net/url_request/url_request_http_job.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M net/url_request/url_request_throttler_entry.h View 1 2 3 7 chunks +39 lines, -7 lines 0 comments Download
M net/url_request/url_request_throttler_entry.cc View 1 2 3 4 5 6 10 chunks +75 lines, -7 lines 0 comments Download
M net/url_request/url_request_throttler_entry_interface.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M net/url_request/url_request_throttler_manager.h View 1 2 3 4 5 6 4 chunks +13 lines, -0 lines 0 comments Download
M net/url_request/url_request_throttler_manager.cc View 1 2 3 4 5 6 3 chunks +40 lines, -2 lines 0 comments Download
M net/url_request/url_request_throttler_unittest.cc View 1 2 3 4 5 6 7 10 chunks +112 lines, -24 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
Jói
Gentlemen, Happy Friday. yzshen: Main reviewer, please review everything. wtc: Please take a quick look ...
9 years, 9 months ago (2011-03-18 19:12:24 UTC) #1
yzshen1
Hi, Joi. Thanks! http://codereview.chromium.org/6711046/diff/1001/net/tools/backoff_server/backoff_server.py File net/tools/backoff_server/backoff_server.py (right): http://codereview.chromium.org/6711046/diff/1001/net/tools/backoff_server/backoff_server.py#newcode40 net/tools/backoff_server/backoff_server.py:40: httpd = BaseHTTPServer.HTTPServer(('', int(sys.argv[1])), RequestHandler) It ...
9 years, 9 months ago (2011-03-18 22:49:50 UTC) #2
wtc
joi: I only reviewed the three net/base/net_util* files. net_util.h is the right home for the ...
9 years, 9 months ago (2011-03-23 00:06:58 UTC) #3
Jói
Gentlemen, please take another look. I have responded to your review comments, and fixed a ...
9 years, 9 months ago (2011-03-23 23:38:24 UTC) #4
yzshen1
http://codereview.chromium.org/6711046/diff/1001/net/url_request/url_request_http_job.cc File net/url_request/url_request_http_job.cc (right): http://codereview.chromium.org/6711046/diff/1001/net/url_request/url_request_http_job.cc#newcode162 net/url_request/url_request_http_job.cc:162: throttling_entry_->UpdateWithResponse(request_info_.url.host(), Okay. On 2011/03/23 23:38:24, Jói wrote: > On ...
9 years, 9 months ago (2011-03-24 20:06:37 UTC) #5
Jói
Thanks, please take a final look. http://codereview.chromium.org/6711046/diff/1001/net/url_request/url_request_throttler_entry.h File net/url_request/url_request_throttler_entry.h (right): http://codereview.chromium.org/6711046/diff/1001/net/url_request/url_request_throttler_entry.h#newcode70 net/url_request/url_request_throttler_entry.h:70: // The manager ...
9 years, 9 months ago (2011-03-24 22:03:45 UTC) #6
yzshen1
LGTM Thanks. On 2011/03/24 22:03:45, Jói wrote: > Thanks, please take a final look. > ...
9 years, 9 months ago (2011-03-24 22:12:34 UTC) #7
wtc
LGTM. Note that I didn't review any of the url_request_throttler* files or the Python script. ...
9 years, 9 months ago (2011-03-25 19:06:24 UTC) #8
Jói
Thanks for the review. I've addressed your comments and uploaded a new version. I will ...
9 years, 9 months ago (2011-03-25 21:26:51 UTC) #9
wtc
http://codereview.chromium.org/6711046/diff/19007/net/base/net_util.cc File net/base/net_util.cc (right): http://codereview.chromium.org/6711046/diff/19007/net/base/net_util.cc#newcode2137 net/base/net_util.cc:2137: return IN6_IS_ADDR_LOOPBACK(&sin6_addr) != FALSE; The != FALSE part should ...
9 years, 9 months ago (2011-03-28 22:08:19 UTC) #10
Jói
9 years, 9 months ago (2011-03-29 14:46:15 UTC) #11
Ah, OK, will fix that today.  The Windows compiler complains of forced
cast to bool without this, so I probably will need to use the !!
trick.

Cheers,
Jói


On Mon, Mar 28, 2011 at 6:08 PM,  <wtc@chromium.org> wrote:
>
> http://codereview.chromium.org/6711046/diff/19007/net/base/net_util.cc
> File net/base/net_util.cc (right):
>
>
http://codereview.chromium.org/6711046/diff/19007/net/base/net_util.cc#newcod...
> net/base/net_util.cc:2137: return IN6_IS_ADDR_LOOPBACK(&sin6_addr) !=
> FALSE;
> The != FALSE part should be unnecessary.  I know why you
> added it.  I've seen Chromium code that uses !! for this
> purpose:
>    return !!IN6_IS_ADDR_LOOPBACK(&sin6_addr);
> which we should use only as a last resort.
>
> Also, FALSE may not be defined on non-Windows platforms.
>
> http://codereview.chromium.org/6711046/
>

Powered by Google App Engine
This is Rietveld 408576698