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

Issue 169643006: Use sockets with unread data if they've never been used before. (Closed)

Created:
6 years, 10 months ago by davidben
Modified:
6 years, 9 months ago
Reviewers:
wtc, Ryan Hamilton, mmenke
CC:
chromium-reviews, cbentzel+watch_chromium.org
Visibility:
Public.

Description

Use sockets with unread data if they've never been used before. This fixes preconnects to SPDY-capable origins. StreamSocket's semantics change slightly. WasEverUsed() for layered sockets is now whether the top-level socket has read or written user data, rather than whether the underlying transport socket was used. Change SSL and SOCKS socket implementations to use the new WasEverUsed() semantics. This doesn't affect SOCKS much except that preconnect misses now time out more aggressively. For SSL, it fixes the SPDY issue. Add tests for SSL socket and socket pool implementations. BUG=334467 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=259671

Patch Set 1 #

Patch Set 2 : Rietveld, please behave. #

Total comments: 3

Patch Set 3 : Rebase #

Patch Set 4 : Revise comment #

Patch Set 5 : Tweak SpdySession::IsReused (erf, got mixed in with a rebase) #

Total comments: 30

Patch Set 6 : Rebase. #

Patch Set 7 : wtc and mmenke comments #

Total comments: 8

Patch Set 8 : mmenke comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+264 lines, -60 lines) Patch
M net/socket/client_socket_pool_base.h View 1 2 3 4 5 6 7 1 chunk +10 lines, -5 lines 0 comments Download
M net/socket/client_socket_pool_base.cc View 1 2 3 4 5 6 2 chunks +8 lines, -4 lines 0 comments Download
M net/socket/client_socket_pool_base_unittest.cc View 1 2 3 4 5 6 7 7 chunks +64 lines, -2 lines 0 comments Download
M net/socket/socks5_client_socket.h View 1 2 3 4 5 6 2 chunks +3 lines, -0 lines 0 comments Download
M net/socket/socks5_client_socket.cc View 1 2 3 4 5 6 6 chunks +33 lines, -13 lines 0 comments Download
net/socket/socks_client_socket.h View 1 2 3 4 5 6 3 chunks +5 lines, -1 line 0 comments Download
M net/socket/socks_client_socket.cc View 1 2 3 4 5 6 7 chunks +32 lines, -12 lines 0 comments Download
M net/socket/ssl_client_socket_nss.cc View 1 2 3 4 5 6 7 7 chunks +36 lines, -15 lines 0 comments Download
M net/socket/ssl_client_socket_openssl.h View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M net/socket/ssl_client_socket_openssl.cc View 1 2 3 4 5 6 6 chunks +10 lines, -5 lines 0 comments Download
M net/socket/ssl_client_socket_unittest.cc View 1 2 3 4 5 6 1 chunk +56 lines, -0 lines 0 comments Download
net/socket/stream_socket.h View 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
davidben
Dunno if we want to rope in more reviewers for this one.
6 years, 10 months ago (2014-02-21 23:35:23 UTC) #1
mmenke
Didn't review the entire CL, see comments. https://codereview.chromium.org/169643006/diff/30002/net/socket/client_socket_pool_base.cc File net/socket/client_socket_pool_base.cc (right): https://codereview.chromium.org/169643006/diff/30002/net/socket/client_socket_pool_base.cc#newcode657 net/socket/client_socket_pool_base.cc:657: return !IsReusable(); ...
6 years, 10 months ago (2014-02-25 17:01:52 UTC) #2
davidben
+wtc. Wan-Teh, do you think this approach will be a problem for SSL close_notify? The ...
6 years, 10 months ago (2014-02-25 20:23:04 UTC) #3
wtc
Hi David, I didn't read the CL, so my answer to your question may be ...
6 years, 10 months ago (2014-02-27 02:11:37 UTC) #4
davidben
Thanks! Given this, I believe this approach will be fine? (And the retry should still ...
6 years, 9 months ago (2014-02-27 16:33:22 UTC) #5
davidben
https://codereview.chromium.org/169643006/diff/30002/net/socket/client_socket_pool_base.h File net/socket/client_socket_pool_base.h (right): https://codereview.chromium.org/169643006/diff/30002/net/socket/client_socket_pool_base.h#newcode346 net/socket/client_socket_pool_base.h:346: // Note that a preconnected socket (one that has ...
6 years, 9 months ago (2014-02-27 16:36:34 UTC) #6
wtc
On 2014/02/27 16:33:22, David Benjamin wrote: > > This CL does change that for the ...
6 years, 9 months ago (2014-02-27 18:00:32 UTC) #7
davidben
On 2014/02/27 18:00:32, wtc wrote: > On 2014/02/27 16:33:22, David Benjamin wrote: > > > ...
6 years, 9 months ago (2014-02-27 18:52:43 UTC) #8
davidben
+rch since this involves SPDY and such, so you should probably look over this and ...
6 years, 9 months ago (2014-03-14 18:51:39 UTC) #9
davidben
On 2014/03/14 18:51:39, David Benjamin wrote: > +rch since this involves SPDY and such, so ...
6 years, 9 months ago (2014-03-14 20:22:12 UTC) #10
davidben
On 2014/03/14 20:22:12, David Benjamin wrote: > HttpStreamFactoryImpl::Job::OnPreconnectsComplete has logic that would be for > ...
6 years, 9 months ago (2014-03-14 21:10:29 UTC) #11
Ryan Hamilton
net/spdy/ changes look good to me, but as you say, we should really have a ...
6 years, 9 months ago (2014-03-14 21:30:47 UTC) #12
mmenke
nss code should be reviewed by someone who knows nss. I have no idea how ...
6 years, 9 months ago (2014-03-18 15:16:54 UTC) #13
davidben
SPDY retry fixes split off into https://codereview.chromium.org/200723004/ with tests and a few other issues writing ...
6 years, 9 months ago (2014-03-18 22:53:54 UTC) #14
wtc
On 2014/03/18 15:16:54, mmenke wrote: > nss code should be reviewed by someone who knows ...
6 years, 9 months ago (2014-03-19 00:17:46 UTC) #15
davidben
Alright, all the CLs split off have landed. We should hopefully retry correctly now on ...
6 years, 9 months ago (2014-03-25 19:50:17 UTC) #16
mmenke
LGTM, just nits https://codereview.chromium.org/169643006/diff/400001/net/socket/client_socket_pool_base.h File net/socket/client_socket_pool_base.h (right): https://codereview.chromium.org/169643006/diff/400001/net/socket/client_socket_pool_base.h#newcode348 net/socket/client_socket_pool_base.h:348: // socket) with unread data may ...
6 years, 9 months ago (2014-03-26 15:18:32 UTC) #17
davidben
https://codereview.chromium.org/169643006/diff/400001/net/socket/client_socket_pool_base.h File net/socket/client_socket_pool_base.h (right): https://codereview.chromium.org/169643006/diff/400001/net/socket/client_socket_pool_base.h#newcode348 net/socket/client_socket_pool_base.h:348: // socket) with unread data may be reused. This ...
6 years, 9 months ago (2014-03-26 16:58:29 UTC) #18
davidben
The CQ bit was checked by davidben@chromium.org
6 years, 9 months ago (2014-03-26 16:59:45 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/davidben@chromium.org/169643006/580001
6 years, 9 months ago (2014-03-26 17:00:34 UTC) #20
commit-bot: I haz the power
6 years, 9 months ago (2014-03-26 20:12:33 UTC) #21
Message was sent while issue was closed.
Change committed as 259671

Powered by Google App Engine
This is Rietveld 408576698