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

Issue 1901533002: Implementation of network level throttler. (Closed)

Created:
4 years, 8 months ago by Randy Smith (Not in Mondays)
Modified:
4 years, 2 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implementation of network level throttler. NetworkThrottleManager serves throttle objects to consumers (currently HttpNetworkTransaction) that inform the consumer of their throttled state and let the throttler track their lifetime. BUG=600839 R=mmenke@chromium.org Committed: https://crrev.com/1d343be5a6202b9f5acaa8c04131fa159d0627c0 Cr-Commit-Position: refs/heads/master@{#426879}

Patch Set 1 #

Total comments: 10

Patch Set 2 : Moved throttle creation and checking to its own state. #

Total comments: 26

Patch Set 3 : Sync'd to p390110 #

Patch Set 4 : Syncing to revision p392237 #

Patch Set 5 : Incorporate comments and add a simple test. #

Total comments: 10

Patch Set 6 : Added test for HttpNetwork #

Patch Set 7 : Fix typo in core_tab_helper.cc, added some comments. #

Patch Set 8 : Fixed incorrect arg call. #

Patch Set 9 : Finally fixed core_tab_helper.cc compilation. #

Total comments: 64

Patch Set 10 : Incorporated all comments, added new tests. #

Total comments: 36

Patch Set 11 : Incorporated latest round of comments." . #

Total comments: 9

Patch Set 12 : Incorporated quick responses. #

Patch Set 13 : Removed priority logging. #

Total comments: 40

Patch Set 14 : Incorporated latest round of comments. #

Total comments: 2

Patch Set 15 : DCHECK + std::set::count #

Total comments: 8

Patch Set 16 : Remove all load_flags = 0 from HttpNetworkTransactionTest. #

Patch Set 17 : Incorporated Avi's comments. #

Patch Set 18 : Make dependent on CL http://codereview.chromium.org/1866483002 to allow followon dependent CL. #

Patch Set 19 : Sync'd to p396735 #

Patch Set 20 : Sync'd to p404484. #

Patch Set 21 : Sync'd to p411135 #

Patch Set 22 : Fixed compile errors involving tests that are no longer parameterized. #

Patch Set 23 : Sync'd to p413382. #

Patch Set 24 : Test for issue 627621 #

Patch Set 25 : Another test for 627621 #

Patch Set 26 : Yet Another test for 627621 #

Patch Set 27 : Another test for 627621 #

Patch Set 28 : git cl try #

Patch Set 29 : Merge fix from dependent PS. #

Patch Set 30 : Adapt to new netlog type list. #

Patch Set 31 : Move BoundNetLog over to new hotness. #

Patch Set 32 : Sync'd to p426538 #

Patch Set 33 : Merge to latest instance of 1866483002 #

Patch Set 34 : Destroy transaction before session in QuicUploadWriteError. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+819 lines, -123 lines) Patch
M chrome/app/generated_resources.grd View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/tab_contents/core_tab_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +3 lines, -0 lines 0 comments Download
M net/base/load_states_list.h View 1 2 3 4 5 6 7 8 9 1 chunk +19 lines, -15 lines 0 comments Download
A net/base/network_throttle_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +94 lines, -0 lines 0 comments Download
A net/base/network_throttle_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +144 lines, -0 lines 0 comments Download
A net/base/network_throttle_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +51 lines, -0 lines 0 comments Download
M net/http/http_network_session.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 3 chunks +5 lines, -0 lines 0 comments Download
M net/http/http_network_session.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 2 chunks +2 lines, -0 lines 0 comments Download
M net/http/http_network_session_peer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +4 lines, -0 lines 0 comments Download
M net/http/http_network_session_peer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +6 lines, -0 lines 0 comments Download
M net/http/http_network_transaction.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 6 chunks +15 lines, -1 line 0 comments Download
M net/http/http_network_transaction.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 6 chunks +54 lines, -1 line 0 comments Download
M net/http/http_network_transaction_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 109 chunks +405 lines, -104 lines 0 comments Download
M net/http/http_stream_factory_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1 chunk +1 line, -0 lines 0 comments Download
M net/log/net_log_event_type_list.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1 chunk +6 lines, -0 lines 0 comments Download
M net/net.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 2 chunks +3 lines, -0 lines 0 comments Download
M net/quic/chromium/quic_network_transaction_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 2 chunks +4 lines, -2 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 103 (44 generated)
Randy Smith (Not in Mondays)
Matt: A design review for you in the shape of a CL :-}. In written ...
4 years, 8 months ago (2016-04-17 22:45:34 UTC) #1
mmenke
A couple quick comments. Overall, this approach seems very reasonable to me. https://codereview.chromium.org/1901533002/diff/1/net/http/http_network_transaction.cc File net/http/http_network_transaction.cc ...
4 years, 8 months ago (2016-04-18 14:57:55 UTC) #2
Randy Smith (Not in Mondays)
Thanks for the review! Possibly we should talk about where the throttler should live in ...
4 years, 8 months ago (2016-04-19 11:37:05 UTC) #3
mmenke
Note that I'm thinking about taking a day off today. https://codereview.chromium.org/1901533002/diff/1/net/http/http_network_transaction.cc File net/http/http_network_transaction.cc (right): https://codereview.chromium.org/1901533002/diff/1/net/http/http_network_transaction.cc#newcode124 ...
4 years, 8 months ago (2016-04-19 13:52:10 UTC) #4
Randy Smith (Not in Mondays)
On 2016/04/19 13:52:10, mmenke wrote: > Note that I'm thinking about taking a day off ...
4 years, 8 months ago (2016-04-19 14:02:17 UTC) #5
Randy Smith (Not in Mondays)
Matt: I've shifted the throttle creation to its own state before NOTIFY_BEFORE_CREATE and added the ...
4 years, 8 months ago (2016-04-20 21:57:38 UTC) #6
mmenke
On 2016/04/20 21:57:38, Randy Smith - Not in Fridays wrote: > Matt: I've shifted the ...
4 years, 8 months ago (2016-04-22 18:06:11 UTC) #7
mmenke
Some more comments. Hope to get to your other CL later today. Sorry for the ...
4 years, 7 months ago (2016-04-29 16:57:28 UTC) #8
mmenke
I think it's worth noting that we're talking about bringing GRPC to Chrome. GRPC creates ...
4 years, 7 months ago (2016-04-29 18:03:15 UTC) #9
Randy Smith (Not in Mondays)
All comments incorporated and a simple test added; PTAL? As with the other CL (adding ...
4 years, 7 months ago (2016-05-08 00:46:31 UTC) #10
mmenke
Responses, will do a pass today. https://codereview.chromium.org/1901533002/diff/20001/net/base/network_stream_throttler.h File net/base/network_stream_throttler.h (right): https://codereview.chromium.org/1901533002/diff/20001/net/base/network_stream_throttler.h#newcode54 net/base/network_stream_throttler.h:54: void NotifyThrottleStateChanged(bool new_throttle_state); ...
4 years, 7 months ago (2016-05-09 17:37:48 UTC) #11
mmenke
For tests, I think it may make sense to make a virtual NetworkStreamThrottler, and test ...
4 years, 7 months ago (2016-05-09 18:08:20 UTC) #12
mmenke
https://codereview.chromium.org/1901533002/diff/20001/net/http/http_network_transaction.cc File net/http/http_network_transaction.cc (right): https://codereview.chromium.org/1901533002/diff/20001/net/http/http_network_transaction.cc#newcode802 net/http/http_network_transaction.cc:802: priority_, request_->load_flags & LOAD_IGNORE_LIMITS); On 2016/05/09 17:37:48, mmenke wrote: ...
4 years, 7 months ago (2016-05-09 18:21:21 UTC) #13
mmenke
https://codereview.chromium.org/1901533002/diff/20001/net/http/http_network_transaction.cc File net/http/http_network_transaction.cc (right): https://codereview.chromium.org/1901533002/diff/20001/net/http/http_network_transaction.cc#newcode802 net/http/http_network_transaction.cc:802: priority_, request_->load_flags & LOAD_IGNORE_LIMITS); On 2016/05/09 17:37:48, mmenke wrote: ...
4 years, 7 months ago (2016-05-09 20:49:41 UTC) #14
Randy Smith (Not in Mondays)
Responding to what I consider the largest abstract issue on this CL first, since resolving ...
4 years, 7 months ago (2016-05-09 22:12:54 UTC) #15
mmenke
https://codereview.chromium.org/1901533002/diff/20001/net/http/http_network_transaction.cc File net/http/http_network_transaction.cc (right): https://codereview.chromium.org/1901533002/diff/20001/net/http/http_network_transaction.cc#newcode802 net/http/http_network_transaction.cc:802: priority_, request_->load_flags & LOAD_IGNORE_LIMITS); On 2016/05/09 22:12:54, Randy Smith ...
4 years, 7 months ago (2016-05-11 18:12:38 UTC) #16
mmenke
And sorry for the slow response - contrary to my email yesterday, I ended up ...
4 years, 7 months ago (2016-05-11 18:14:08 UTC) #17
Randy Smith (Not in Mondays)
On 2016/05/11 18:12:38, mmenke wrote: > https://codereview.chromium.org/1901533002/diff/20001/net/http/http_network_transaction.cc > File net/http/http_network_transaction.cc (right): > > https://codereview.chromium.org/1901533002/diff/20001/net/http/http_network_transaction.cc#newcode802 > ...
4 years, 7 months ago (2016-05-12 20:17:52 UTC) #18
Randy Smith (Not in Mondays)
Matt: I think this is ready for another round of review. I think I've addressed ...
4 years, 7 months ago (2016-05-15 21:49:20 UTC) #19
mmenke
https://codereview.chromium.org/1901533002/diff/160001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): https://codereview.chromium.org/1901533002/diff/160001/chrome/app/generated_resources.grd#newcode8728 chrome/app/generated_resources.grd:8728: + <message name="IDS_LOAD_STATE_THROTTLED"> Know the others don't, but should ...
4 years, 7 months ago (2016-05-17 18:15:28 UTC) #20
mmenke
On 2016/05/15 21:49:20, Randy Smith - Not in Fridays wrote: > Matt: I think this ...
4 years, 7 months ago (2016-05-17 18:21:02 UTC) #21
mmenke
On 2016/05/17 18:21:02, mmenke wrote: > On 2016/05/15 21:49:20, Randy Smith - Not in Fridays ...
4 years, 7 months ago (2016-05-17 18:22:49 UTC) #22
Randy Smith (Not in Mondays)
On 2016/05/17 18:22:49, mmenke wrote: > On 2016/05/17 18:21:02, mmenke wrote: > > On 2016/05/15 ...
4 years, 7 months ago (2016-05-17 23:31:23 UTC) #23
Randy Smith (Not in Mondays)
I'm afraid I didn't do the LoadState enum restructure, and I haven't handled the problem ...
4 years, 7 months ago (2016-05-17 23:32:15 UTC) #24
mmenke
On 2016/05/17 23:31:23, Randy Smith - Not in Fridays wrote: > On 2016/05/17 18:22:49, mmenke ...
4 years, 7 months ago (2016-05-17 23:57:43 UTC) #25
Randy Smith (Not in Mondays)
On 2016/05/17 23:57:43, mmenke wrote: > On 2016/05/17 23:31:23, Randy Smith - Not in Fridays ...
4 years, 7 months ago (2016-05-18 12:22:54 UTC) #26
mmenke
On 2016/05/18 12:22:54, Randy Smith - Not in Fridays wrote: > On 2016/05/17 23:57:43, mmenke ...
4 years, 7 months ago (2016-05-18 17:18:36 UTC) #27
mmenke
Sorry for slowness, plan to get back to this one tomorrow.
4 years, 7 months ago (2016-05-19 18:26:10 UTC) #28
mmenke
Actually did get to this last week, just didn't publish my comments. https://codereview.chromium.org/1901533002/diff/180001/net/http/http_network_transaction.cc File net/http/http_network_transaction.cc ...
4 years, 7 months ago (2016-05-23 15:00:17 UTC) #29
mmenke
https://codereview.chromium.org/1901533002/diff/180001/net/http/http_network_transaction.cc File net/http/http_network_transaction.cc (right): https://codereview.chromium.org/1901533002/diff/180001/net/http/http_network_transaction.cc#newcode449 net/http/http_network_transaction.cc:449: // at higher levels, this shouldn't cause any problems. ...
4 years, 7 months ago (2016-05-23 15:41:53 UTC) #30
Randy Smith (Not in Mondays)
On 2016/05/18 17:18:36, mmenke wrote: > On 2016/05/18 12:22:54, Randy Smith - Not in Fridays ...
4 years, 7 months ago (2016-05-24 20:07:35 UTC) #31
Randy Smith (Not in Mondays)
On 2016/05/23 15:41:53, mmenke wrote: > https://codereview.chromium.org/1901533002/diff/180001/net/http/http_network_transaction.cc > File net/http/http_network_transaction.cc (right): > > https://codereview.chromium.org/1901533002/diff/180001/net/http/http_network_transaction.cc#newcode449 > ...
4 years, 7 months ago (2016-05-24 20:08:08 UTC) #32
mmenke
On 2016/05/24 20:07:35, Randy Smith - Not in Fridays wrote: > On 2016/05/18 17:18:36, mmenke ...
4 years, 7 months ago (2016-05-24 20:11:46 UTC) #33
Randy Smith (Not in Mondays)
Matt: I believe I've addressed all your comments. Also note I have two questions for ...
4 years, 7 months ago (2016-05-24 21:38:50 UTC) #34
mmenke
quick responses. https://codereview.chromium.org/1901533002/diff/180001/net/http/http_network_transaction_unittest.cc File net/http/http_network_transaction_unittest.cc (right): https://codereview.chromium.org/1901533002/diff/180001/net/http/http_network_transaction_unittest.cc#newcode16065 net/http/http_network_transaction_unittest.cc:16065: request.load_flags = 0; On 2016/05/24 21:38:49, Randy ...
4 years, 7 months ago (2016-05-24 21:52:50 UTC) #35
mmenke
https://codereview.chromium.org/1901533002/diff/200001/net/http/http_network_transaction.cc File net/http/http_network_transaction.cc (right): https://codereview.chromium.org/1901533002/diff/200001/net/http/http_network_transaction.cc#newcode440 net/http/http_network_transaction.cc:440: const std::string priority_string(RequestPriorityToString(priority)); On 2016/05/24 21:52:50, mmenke wrote: > ...
4 years, 7 months ago (2016-05-24 22:59:52 UTC) #36
Randy Smith (Not in Mondays)
Ok, incorporated your quick responses; ready for your next review. https://codereview.chromium.org/1901533002/diff/180001/net/http/http_network_transaction_unittest.cc File net/http/http_network_transaction_unittest.cc (right): https://codereview.chromium.org/1901533002/diff/180001/net/http/http_network_transaction_unittest.cc#newcode16065 ...
4 years, 7 months ago (2016-05-24 23:20:30 UTC) #37
mmenke
Mind fixing the build issue, and pinging me? Think we're on the final pass. https://codereview.chromium.org/1901533002/diff/200001/net/http/http_network_transaction.cc ...
4 years, 7 months ago (2016-05-25 15:32:15 UTC) #38
mmenke
On 2016/05/25 15:32:15, mmenke wrote: > Mind fixing the build issue, and pinging me? Think ...
4 years, 7 months ago (2016-05-25 15:33:59 UTC) #39
mmenke
On 2016/05/25 15:33:59, mmenke wrote: > On 2016/05/25 15:32:15, mmenke wrote: > > Mind fixing ...
4 years, 7 months ago (2016-05-25 15:34:53 UTC) #40
Randy Smith (Not in Mondays)
There's enough green from the try bots for me to think it's worthwhile tossing this ...
4 years, 7 months ago (2016-05-25 16:57:48 UTC) #41
mmenke
On 2016/05/25 16:57:48, Randy Smith - Not in Fridays wrote: > There's enough green from ...
4 years, 7 months ago (2016-05-25 18:23:52 UTC) #42
mmenke
https://codereview.chromium.org/1901533002/diff/240001/net/base/network_stream_throttler.cc File net/base/network_stream_throttler.cc (right): https://codereview.chromium.org/1901533002/diff/240001/net/base/network_stream_throttler.cc#newcode18 net/base/network_stream_throttler.cc:18: bool IsThrottled() const override { return throttled_; } I'd ...
4 years, 7 months ago (2016-05-25 19:11:21 UTC) #43
Randy Smith (Not in Mondays)
Ok, I think I got everything (the rename was the tricky part). PTAL? https://codereview.chromium.org/1901533002/diff/240001/net/base/network_stream_throttler.cc File ...
4 years, 7 months ago (2016-05-25 23:48:25 UTC) #45
mmenke
https://codereview.chromium.org/1901533002/diff/240001/net/base/network_stream_throttler.cc File net/base/network_stream_throttler.cc (right): https://codereview.chromium.org/1901533002/diff/240001/net/base/network_stream_throttler.cc#newcode122 net/base/network_stream_throttler.cc:122: stream->set_queue_pointer(priority_queue_.Insert(stream, new_priority)); On 2016/05/25 23:48:23, Randy Smith - Not ...
4 years, 7 months ago (2016-05-25 23:58:05 UTC) #46
Randy Smith (Not in Mondays)
https://codereview.chromium.org/1901533002/diff/240001/net/base/network_stream_throttler.cc File net/base/network_stream_throttler.cc (right): https://codereview.chromium.org/1901533002/diff/240001/net/base/network_stream_throttler.cc#newcode122 net/base/network_stream_throttler.cc:122: stream->set_queue_pointer(priority_queue_.Insert(stream, new_priority)); On 2016/05/25 23:58:04, mmenke wrote: > On ...
4 years, 7 months ago (2016-05-26 14:56:39 UTC) #47
mmenke
https://codereview.chromium.org/1901533002/diff/240001/net/base/network_stream_throttler.cc File net/base/network_stream_throttler.cc (right): https://codereview.chromium.org/1901533002/diff/240001/net/base/network_stream_throttler.cc#newcode122 net/base/network_stream_throttler.cc:122: stream->set_queue_pointer(priority_queue_.Insert(stream, new_priority)); On 2016/05/26 14:56:39, Randy Smith - Not ...
4 years, 7 months ago (2016-05-26 15:05:54 UTC) #48
mmenke
LGTM. Just one optional suggestion, and my previous suggestion of DCHECK. https://codereview.chromium.org/1901533002/diff/260001/net/http/http_network_transaction_unittest.cc File net/http/http_network_transaction_unittest.cc (right): ...
4 years, 7 months ago (2016-05-26 16:23:26 UTC) #49
Randy Smith (Not in Mondays)
Switched over to DCHECK. Thanks! Avi, could you take a look at core_tab_helper.cc? https://codereview.chromium.org/1901533002/diff/260001/net/http/http_network_transaction_unittest.cc File ...
4 years, 6 months ago (2016-05-28 02:28:00 UTC) #51
Randy Smith (Not in Mondays)
On 2016/05/28 02:28:00, Randy Smith - Not in Fridays wrote: > Switched over to DCHECK. ...
4 years, 6 months ago (2016-05-28 02:35:12 UTC) #52
Avi (use Gerrit)
core_tab_helper.cc LGTM Nitpicked typos everywhere else. https://codereview.chromium.org/1901533002/diff/280001/net/base/network_throttle_manager.cc File net/base/network_throttle_manager.cc (right): https://codereview.chromium.org/1901533002/diff/280001/net/base/network_throttle_manager.cc#newcode20 net/base/network_throttle_manager.cc:20: // Caller must ...
4 years, 6 months ago (2016-05-28 02:43:06 UTC) #53
Randy Smith (Not in Mondays)
All done; thanks for the copyediting! https://codereview.chromium.org/1901533002/diff/280001/net/base/network_throttle_manager.cc File net/base/network_throttle_manager.cc (right): https://codereview.chromium.org/1901533002/diff/280001/net/base/network_throttle_manager.cc#newcode20 net/base/network_throttle_manager.cc:20: // Caller must ...
4 years, 6 months ago (2016-05-30 13:58:22 UTC) #54
Randy Smith (Not in Mondays)
Merge fix from dependent PS.
4 years, 3 months ago (2016-09-23 21:25:51 UTC) #72
Randy Smith (Not in Mondays)
Adapt to new netlog type list.
4 years, 3 months ago (2016-09-23 21:29:51 UTC) #73
Randy Smith (Not in Mondays)
Ryan, could you take a look at PS33->34? I needed to tweak a Quic test ...
4 years, 2 months ago (2016-10-21 18:18:58 UTC) #92
Ryan Hamilton
On 2016/10/21 18:18:58, Randy Smith - Not in Mondays wrote: > Ryan, could you take ...
4 years, 2 months ago (2016-10-21 18:37:28 UTC) #94
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/1901533002/680001
4 years, 2 months ago (2016-10-21 20:16:26 UTC) #99
commit-bot: I haz the power
Committed patchset #34 (id:680001)
4 years, 2 months ago (2016-10-21 20:38:22 UTC) #101
commit-bot: I haz the power
4 years, 2 months ago (2016-10-21 20:40:41 UTC) #103
Message was sent while issue was closed.
Patchset 34 (id:??) landed as
https://crrev.com/1d343be5a6202b9f5acaa8c04131fa159d0627c0
Cr-Commit-Position: refs/heads/master@{#426879}

Powered by Google App Engine
This is Rietveld 408576698