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

Issue 10905259: Refactor blocking network delegates (Closed)

Created:
8 years, 3 months ago by vabr (Chromium)
Modified:
8 years, 2 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

There are two blocking network delegates in url_request_unittest: BlockingNetworkDelegate and BlockingNetworkDelegateWithManualCallback They provide various functions: * blocking in various stages of the request * three ways of responding in blocked stages: synchronous, automatic callback, and user-triggered callback * redirection But not all combinations are available (e.g. synchronous blocking after headers are sent), because the user has to chose only one of the delegates. This CL aims at allowing to combine those functions without code duplication, by joining the two classes into one. BUG=146816 TEST=N/A (this is only in unittests, also no change in behaviour of any unit-test, and no new added) Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=158724

Patch Set 1 #

Total comments: 9

Patch Set 2 : #

Patch Set 3 : Both original BlockingNetworkDelegates merged into one #

Total comments: 39

Patch Set 4 : Comments addressed #

Total comments: 1

Patch Set 5 : Rebased #

Total comments: 21

Patch Set 6 : Comments addressed, part 1 (without changing message loop usage yet) #

Total comments: 25

Patch Set 7 : Comments addressed, part 2 (changes to WaitForState) #

Patch Set 8 : Conversion of tests using BlockingNetworkDelegate* corrected + getting rid of WaitUntilBlocked #

Total comments: 36

Patch Set 9 : Comments addressed #

Patch Set 10 : Added requested unit-test + BlockOn rewritten to set_block_on #

Patch Set 11 : Fixed clean-up in NetworkDelegateBlockAsynchronously #

Total comments: 4

Patch Set 12 : Moving NetworkDelegateBlockAsynchronously up #

Patch Set 13 : Disabling NetworkDelegateBlockAsynchronously in CF #

Unified diffs Side-by-side diffs Delta from patch set Stats (+357 lines, -211 lines) Patch
M chrome_frame/test/net/fake_external_tab.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +5 lines, -0 lines 0 comments Download
M net/url_request/url_request_test_util.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M net/url_request/url_request_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 21 chunks +350 lines, -210 lines 0 comments Download

Messages

Total messages: 40 (0 generated)
vabr (Chromium)
Hi Matt, To avoid code duplication when adding the synchronous-cancel unit-test in http://codereview.chromium.org/10911151/, I believe ...
8 years, 3 months ago (2012-09-13 11:21:27 UTC) #1
mmenke
I'm a bit concerned about the extra complexity inheritance this introduces, and some of the ...
8 years, 3 months ago (2012-09-13 15:28:02 UTC) #2
vabr (Chromium)
Hi Matt, Thanks for a quick response and the heads-up about your day off. In ...
8 years, 3 months ago (2012-09-13 17:23:35 UTC) #3
mmenke
On 2012/09/13 17:23:35, vabr (Chromium) wrote: > Hi Matt, > > Thanks for a quick ...
8 years, 3 months ago (2012-09-13 18:48:07 UTC) #4
mmenke
http://codereview.chromium.org/10905259/diff/1/net/url_request/url_request_unittest.cc File net/url_request/url_request_unittest.cc (right): http://codereview.chromium.org/10905259/diff/1/net/url_request/url_request_unittest.cc#newcode314 net/url_request/url_request_unittest.cc:314: // TODO(vabr): remove when corresponding On* overrides are implemented. ...
8 years, 3 months ago (2012-09-13 20:44:20 UTC) #5
vabr (Chromium)
Hi Matt, Thanks for being more specific with your objections! > (...) overrides functions for ...
8 years, 3 months ago (2012-09-14 17:17:49 UTC) #6
mmenke
I think merging the two is a reasonable idea - considered suggesting it myself. http://codereview.chromium.org/10905259/diff/13003/net/url_request/url_request_unittest.cc ...
8 years, 3 months ago (2012-09-17 19:25:23 UTC) #7
mmenke
http://codereview.chromium.org/10905259/diff/13003/net/url_request/url_request_unittest.cc File net/url_request/url_request_unittest.cc (right): http://codereview.chromium.org/10905259/diff/13003/net/url_request/url_request_unittest.cc#newcode178 net/url_request/url_request_unittest.cc:178: ASSERT_NE(retval, ERR_IO_PENDING); On 2012/09/17 19:25:23, Matt Menke wrote: > ...
8 years, 3 months ago (2012-09-17 19:32:56 UTC) #8
vabr (Chromium)
Hi Matt, Thanks for your careful review. I like the improvements you suggested! PTAL, Vaclav ...
8 years, 3 months ago (2012-09-18 17:21:48 UTC) #9
mmenke
Sorry I didn't get to this yesterday. And sorry to hold up your other CL ...
8 years, 3 months ago (2012-09-19 19:39:47 UTC) #10
vabr (Chromium)
Hi Matt, Before I dive into the technical part: I'm really thankful to you for ...
8 years, 3 months ago (2012-09-20 11:45:44 UTC) #11
mmenke
https://codereview.chromium.org/10905259/diff/13003/net/url_request/url_request_unittest.cc File net/url_request/url_request_unittest.cc (right): https://codereview.chromium.org/10905259/diff/13003/net/url_request/url_request_unittest.cc#newcode203 net/url_request/url_request_unittest.cc:203: void WaitForState(Stage stage) { On 2012/09/20 11:45:44, vabr (Chromium) ...
8 years, 3 months ago (2012-09-20 15:37:52 UTC) #12
mmenke
https://codereview.chromium.org/10905259/diff/28001/net/url_request/url_request_unittest.cc File net/url_request/url_request_unittest.cc (right): https://codereview.chromium.org/10905259/diff/28001/net/url_request/url_request_unittest.cc#newcode2051 net/url_request/url_request_unittest.cc:2051: TEST_F(URLRequestTestHTTP, NetworkDelegateRedirectRequest) { On 2012/09/20 15:37:52, Matt Menke wrote: ...
8 years, 3 months ago (2012-09-20 15:40:49 UTC) #13
vabr (Chromium)
Hi Matt, Thanks very much for spotting and checking the issue with migrating tests from ...
8 years, 3 months ago (2012-09-21 11:11:36 UTC) #14
mmenke
Just nits, basically. It's looking pretty good to me now. Carefully went over the test ...
8 years, 3 months ago (2012-09-21 15:15:59 UTC) #15
mmenke
http://codereview.chromium.org/10905259/diff/34004/net/url_request/url_request_unittest.cc File net/url_request/url_request_unittest.cc (right): http://codereview.chromium.org/10905259/diff/34004/net/url_request/url_request_unittest.cc#newcode245 net/url_request/url_request_unittest.cc:245: void Reset() { On 2012/09/21 15:15:59, Matt Menke wrote: ...
8 years, 3 months ago (2012-09-21 15:18:26 UTC) #16
mmenke
On 2012/09/21 15:15:59, Matt Menke wrote: > Just nits, basically. It's looking pretty good to ...
8 years, 3 months ago (2012-09-21 15:23:41 UTC) #17
vabr (Chromium)
Hi Matt, Thanks for the quick turn-around! I addressed all your comments, except for the ...
8 years, 3 months ago (2012-09-21 20:03:42 UTC) #18
mmenke
LGTM, but you may want to add a unit test, as suggested below. http://codereview.chromium.org/10905259/diff/34004/net/url_request/url_request_unittest.cc File ...
8 years, 3 months ago (2012-09-21 20:20:18 UTC) #19
mmenke
On 2012/09/21 20:20:18, Matt Menke wrote: > LGTM, but you may want to add a ...
8 years, 3 months ago (2012-09-21 20:40:56 UTC) #20
vabr (Chromium)
Hi Matt, Thanks for clarifying the comment about BlockOn -> set_block_on, it was now easy ...
8 years, 3 months ago (2012-09-23 08:46:16 UTC) #21
mmenke
LGTM. http://codereview.chromium.org/10905259/diff/41003/net/url_request/url_request_unittest.cc File net/url_request/url_request_unittest.cc (right): http://codereview.chromium.org/10905259/diff/41003/net/url_request/url_request_unittest.cc#newcode2504 net/url_request/url_request_unittest.cc:2504: TEST_F(URLRequestTestHTTP, NetworkDelegateBlockAsynchronously) { optional nit: Suggest making this ...
8 years, 3 months ago (2012-09-24 14:49:44 UTC) #22
vabr (Chromium)
Thanks a lot, Matt! Addressed your last two comments, and sending to CQ. Vaclav http://codereview.chromium.org/10905259/diff/41003/net/url_request/url_request_unittest.cc ...
8 years, 3 months ago (2012-09-24 14:58:10 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vabr@chromium.org/10905259/42005
8 years, 3 months ago (2012-09-24 14:58:23 UTC) #24
commit-bot: I haz the power
Retried try job too often for step(s) chrome_frame_net_tests
8 years, 3 months ago (2012-09-24 19:08:56 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vabr@chromium.org/10905259/42005
8 years, 3 months ago (2012-09-24 19:26:07 UTC) #26
commit-bot: I haz the power
Retried try job too often for step(s) chrome_frame_net_tests
8 years, 3 months ago (2012-09-24 23:34:26 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vabr@chromium.org/10905259/42005
8 years, 3 months ago (2012-09-25 05:27:14 UTC) #28
vabr (Chromium)
On 2012/09/25 05:27:14, I haz the power (commit-bot) wrote: > CQ is trying da patch. ...
8 years, 3 months ago (2012-09-25 05:58:19 UTC) #29
mmenke
On 2012/09/25 05:58:19, vabr (Chromium) wrote: > On 2012/09/25 05:27:14, I haz the power (commit-bot) ...
8 years, 3 months ago (2012-09-25 06:03:11 UTC) #30
vabr (Chromium)
On 2012/09/25 06:03:11, Matt Menke wrote: > On 2012/09/25 05:58:19, vabr (Chromium) wrote: > > ...
8 years, 2 months ago (2012-09-25 17:29:55 UTC) #31
vabr (Chromium)
Erik, The net/url_request part of this CL has been reviewed by Matt, but one newly ...
8 years, 2 months ago (2012-09-25 17:38:50 UTC) #32
mmenke
On 2012/09/25 17:38:50, vabr (Chromium) wrote: > Erik, > The net/url_request part of this CL ...
8 years, 2 months ago (2012-09-25 17:53:06 UTC) #33
erikwright (departed)
On 2012/09/25 17:53:06, Matt Menke wrote: > On 2012/09/25 17:38:50, vabr (Chromium) wrote: > > ...
8 years, 2 months ago (2012-09-25 18:58:35 UTC) #34
mmenke
On 2012/09/25 18:58:35, erikwright wrote: > On 2012/09/25 17:53:06, Matt Menke wrote: > > On ...
8 years, 2 months ago (2012-09-25 19:00:30 UTC) #35
erikwright (departed)
On 2012/09/25 19:00:30, Matt Menke wrote: > On 2012/09/25 18:58:35, erikwright wrote: > > On ...
8 years, 2 months ago (2012-09-25 19:17:54 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vabr@chromium.org/10905259/51001
8 years, 2 months ago (2012-09-25 22:06:40 UTC) #37
vabr (Chromium)
Thanks both for your replies. The try job just passed the CF tests, so blacklisting ...
8 years, 2 months ago (2012-09-25 22:08:43 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vabr@chromium.org/10905259/51001
8 years, 2 months ago (2012-09-26 00:09:01 UTC) #39
commit-bot: I haz the power
8 years, 2 months ago (2012-09-26 02:49:35 UTC) #40
Change committed as 158724

Powered by Google App Engine
This is Rietveld 408576698