Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Issue 151118: Refactor ConnectJob and TCPConnectJob. (Closed)

Created:
11 years, 5 months ago by willchan no longer on Chromium
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Refactor ConnectJob and TCPConnectJob. ConnectJob will only call OnConnectJobComplete() on asynchronous completion. TCPConnectJob now uses DoLoop() internally. BUG=http://crbug.com/13289 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=19789

Patch Set 1 #

Total comments: 13

Patch Set 2 : A little more refactoring to make late binding simpler. #

Patch Set 3 : Address comments. #

Total comments: 8

Patch Set 4 : Rename RemoveActiveSocket. #

Total comments: 5

Patch Set 5 : New test. #

Total comments: 2

Patch Set 6 : Add comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+291 lines, -163 lines) Patch
M net/socket/client_socket_pool_base.h View 1 2 3 4 5 chunks +51 lines, -32 lines 0 comments Download
M net/socket/client_socket_pool_base.cc View 1 2 3 4 10 chunks +83 lines, -69 lines 0 comments Download
M net/socket/client_socket_pool_base_unittest.cc View 1 2 3 4 5 5 chunks +81 lines, -17 lines 0 comments Download
M net/socket/tcp_client_socket_pool.h View 1 chunk +16 lines, -12 lines 0 comments Download
M net/socket/tcp_client_socket_pool.cc View 3 chunks +60 lines, -33 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
willchan no longer on Chromium
I was about to start writing the late binding code, but then realized that it ...
11 years, 5 months ago (2009-06-30 22:19:33 UTC) #1
eroman
Thanks for making the changes, I think this is much more readable now! LGTM; I ...
11 years, 5 months ago (2009-06-30 23:36:25 UTC) #2
willchan no longer on Chromium
+phajdan.jr Heads up for Pawel since using different counters will give him merge conflicts. I'm ...
11 years, 5 months ago (2009-06-30 23:53:51 UTC) #3
Paweł Hajdan Jr.
Thanks for notice. Feel free to check in. I have various presentations and orientations this ...
11 years, 5 months ago (2009-06-30 23:56:09 UTC) #4
willchan no longer on Chromium
Running the try jobs now... http://codereview.chromium.org/151118/diff/1/2 File net/socket/client_socket_pool_base.cc (right): http://codereview.chromium.org/151118/diff/1/2#newcode136 Line 136: RemoveActiveSocket(group_name, &group); On ...
11 years, 5 months ago (2009-07-01 00:35:42 UTC) #5
eroman
http://codereview.chromium.org/151118/diff/9/1016 File net/socket/client_socket_pool_base.cc (right): http://codereview.chromium.org/151118/diff/9/1016#newcode125 Line 125: RemoveActiveSocket(group_name, &group); The use of RemoveActiveSocket() is odd. ...
11 years, 5 months ago (2009-07-01 01:06:43 UTC) #6
willchan no longer on Chromium
http://codereview.chromium.org/151118/diff/9/1016 File net/socket/client_socket_pool_base.cc (right): http://codereview.chromium.org/151118/diff/9/1016#newcode125 Line 125: RemoveActiveSocket(group_name, &group); On 2009/07/01 01:06:43, eroman wrote: > ...
11 years, 5 months ago (2009-07-01 02:16:52 UTC) #7
eroman
Can you add a unit-test that hits the new dispatch order (i.e. when a queued ...
11 years, 5 months ago (2009-07-01 04:11:44 UTC) #8
willchan no longer on Chromium
I ended adding two tests on accident. The one that actually covers the case you ...
11 years, 5 months ago (2009-07-01 05:18:47 UTC) #9
eroman
lgtm http://codereview.chromium.org/151118/diff/24/1036 File net/socket/client_socket_pool_base_unittest.cc (right): http://codereview.chromium.org/151118/diff/24/1036#newcode672 Line 672: EXPECT_EQ(&req3, request_order_[1]); Why does this finish before ...
11 years, 5 months ago (2009-07-01 22:19:02 UTC) #10
willchan no longer on Chromium
11 years, 5 months ago (2009-07-01 22:28:00 UTC) #11
Thanks for the thorough review!

http://codereview.chromium.org/151118/diff/24/1036
File net/socket/client_socket_pool_base_unittest.cc (right):

http://codereview.chromium.org/151118/diff/24/1036#newcode672
Line 672: EXPECT_EQ(&req3, request_order_[1]);
On 2009/07/01 22:19:03, eroman wrote:
> Why does this finish before request 2?
> 
> Is it because request 1 finishes before request 2, therefore request 3 which
is
> sync gets started from request 1's completion, therfore finishes before
request
> 2?
> 
> Whatever the case, please add a comment explaining this expectation.

Correct.  I've updated the comments.

Powered by Google App Engine
This is Rietveld 408576698