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

Issue 2593063003: Add Socket::ReadIfReady() (Closed)

Created:
4 years ago by xunjieli
Modified:
3 years, 9 months ago
Reviewers:
Bence, davidben
CC:
chromium-reviews, cbentzel+watch_chromium.org, mmenke
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add Socket::ReadIfReady() This CL adds a new read method to socket class. The new read method allows caller to not retain an IOBuffer if desired. The new functionality is hidden behind a field trial flag: SocketReadIfReady. The design doc is at: https://docs.google.com/document/d/1DsVcQ4-jsaIhu_OvIid-UHMUQfFqWYfmThMnQoZ1csc/edit# BUG=690915 Review-Url: https://codereview.chromium.org/2593063003 Cr-Commit-Position: refs/heads/master@{#455177} Committed: https://chromium.googlesource.com/chromium/src/+/321a96f376e57651a1ad987f5585c0f07128e63a

Patch Set 1 : fixed tests #

Patch Set 2 : Fix tests for real #

Total comments: 42

Patch Set 3 : rebased #

Patch Set 4 : Addressed most of comments #

Patch Set 5 : Attempt at FakeBlockingStreamSocket #

Patch Set 6 : fix asan #

Patch Set 7 : Self #

Total comments: 38

Patch Set 8 : Address comments #

Patch Set 9 : self #

Patch Set 10 : self #

Patch Set 11 : Fix perf tests (removed invalid CHECKs) #

Total comments: 20

Patch Set 12 : pure rebase before addressing comments #

Patch Set 13 : Address David's comments #

Patch Set 14 : self review. remove unused include #

Total comments: 90

Patch Set 15 : Address bnc comments #

Total comments: 2

Patch Set 16 : Address Bence comment #

Patch Set 17 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+737 lines, -185 lines) Patch
M net/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M net/base/net_error_list.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +4 lines, -0 lines 0 comments Download
M net/socket/socket.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +17 lines, -0 lines 0 comments Download
A net/socket/socket.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +20 lines, -0 lines 0 comments Download
M net/socket/socket_bio_adapter.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M net/socket/socket_bio_adapter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +25 lines, -2 lines 0 comments Download
M net/socket/socket_bio_adapter_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 16 chunks +50 lines, -16 lines 0 comments Download
M net/socket/socket_posix.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +14 lines, -1 line 0 comments Download
M net/socket/socket_posix.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +41 lines, -13 lines 0 comments Download
M net/socket/socket_test_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +31 lines, -3 lines 0 comments Download
M net/socket/socket_test_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 10 chunks +88 lines, -55 lines 0 comments Download
M net/socket/ssl_client_socket_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +4 lines, -1 line 0 comments Download
M net/socket/ssl_client_socket_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 7 chunks +28 lines, -17 lines 0 comments Download
M net/socket/ssl_client_socket_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 40 chunks +226 lines, -50 lines 0 comments Download
M net/socket/tcp_client_socket.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +10 lines, -0 lines 0 comments Download
M net/socket/tcp_client_socket.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +26 lines, -12 lines 0 comments Download
M net/socket/tcp_socket_posix.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +5 lines, -0 lines 0 comments Download
M net/socket/tcp_socket_posix.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +42 lines, -11 lines 0 comments Download
M net/socket/tcp_socket_win.h View 1 chunk +3 lines, -0 lines 0 comments Download
M net/socket/tcp_socket_win.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M net/spdy/spdy_session.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +20 lines, -4 lines 0 comments Download
M net/spdy/spdy_session_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +73 lines, -0 lines 0 comments Download

Messages

Total messages: 86 (62 generated)
xunjieli
David: This is not ready, but I'd like to get some early feedback in case ...
3 years, 10 months ago (2017-01-27 23:10:12 UTC) #32
xunjieli
David, a friendly ping!
3 years, 10 months ago (2017-01-31 15:37:51 UTC) #35
davidben
Did a review pass. Overall this looks good. Comments are mostly around whether we could ...
3 years, 10 months ago (2017-02-01 22:25:58 UTC) #36
xunjieli
Thanks for the thorough review! I have addressed comments and uploaded a new patch. I ...
3 years, 10 months ago (2017-02-03 16:35:33 UTC) #41
xunjieli
David, a friendly ping. Thanks!
3 years, 10 months ago (2017-02-10 13:12:06 UTC) #46
davidben
I feel like it says something odd about the world that adding ReadIfReady support to ...
3 years, 10 months ago (2017-02-10 23:33:49 UTC) #53
xunjieli
> I feel like it says something odd about the world that adding ReadIfReady > ...
3 years, 10 months ago (2017-02-13 20:28:19 UTC) #54
xunjieli
And I also fixed the perf tests. It was due to invalid DCHECKs that I ...
3 years, 10 months ago (2017-02-14 15:09:17 UTC) #55
xunjieli
+ bnc@: PTAL. Thanks!
3 years, 9 months ago (2017-03-02 19:47:05 UTC) #57
davidben
Minor comments, but otherwise I think this is good. lgtm! https://codereview.chromium.org/2593063003/diff/500001/net/socket/socket_test_util.cc File net/socket/socket_test_util.cc (right): https://codereview.chromium.org/2593063003/diff/500001/net/socket/socket_test_util.cc#newcode924 ...
3 years, 9 months ago (2017-03-02 20:47:03 UTC) #58
xunjieli
Thanks! I will wait for Bence to get a chance to review. I will clean ...
3 years, 9 months ago (2017-03-02 22:30:21 UTC) #61
Bence
Great work! I really look forward to the reduced memory usage that this feature should ...
3 years, 9 months ago (2017-03-03 16:33:42 UTC) #62
xunjieli
Thanks, Bence. PTAL. https://codereview.chromium.org/2593063003/diff/560001/net/base/net_error_list.h File net/base/net_error_list.h (right): https://codereview.chromium.org/2593063003/diff/560001/net/base/net_error_list.h#newcode389 net/base/net_error_list.h:389: // Socket ReadIfReady support is not ...
3 years, 9 months ago (2017-03-03 19:41:07 UTC) #63
Bence
LGTM, thank you. https://codereview.chromium.org/2593063003/diff/560001/net/socket/socket.cc File net/socket/socket.cc (right): https://codereview.chromium.org/2593063003/diff/560001/net/socket/socket.cc#newcode14 net/socket/socket.cc:14: int Socket::ReadIfReady(IOBuffer* buf, On 2017/03/03 19:41:05, ...
3 years, 9 months ago (2017-03-06 23:43:14 UTC) #64
xunjieli
Thanks! https://codereview.chromium.org/2593063003/diff/580001/net/socket/ssl_client_socket_impl.cc File net/socket/ssl_client_socket_impl.cc (right): https://codereview.chromium.org/2593063003/diff/580001/net/socket/ssl_client_socket_impl.cc#newcode1566 net/socket/ssl_client_socket_impl.cc:1566: // the user know that read can be ...
3 years, 9 months ago (2017-03-07 01:06:45 UTC) #65
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/2593063003/600001
3 years, 9 months ago (2017-03-07 01:07:57 UTC) #68
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/395411)
3 years, 9 months ago (2017-03-07 04:49:54 UTC) #70
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/2593063003/600001
3 years, 9 months ago (2017-03-07 12:23:42 UTC) #72
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/395913)
3 years, 9 months ago (2017-03-07 15:09:40 UTC) #74
xunjieli
On 2017/03/07 15:09:40, commit-bot: I haz the power wrote: > Try jobs failed on following ...
3 years, 9 months ago (2017-03-07 15:21:40 UTC) #75
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/2593063003/600001
3 years, 9 months ago (2017-03-07 15:22:28 UTC) #77
commit-bot: I haz the power
Failed to apply patch for net/spdy/spdy_session.cc: While running git apply --index -p1; error: patch failed: ...
3 years, 9 months ago (2017-03-07 16:54:58 UTC) #79
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/2593063003/620001
3 years, 9 months ago (2017-03-07 17:34:14 UTC) #82
commit-bot: I haz the power
3 years, 9 months ago (2017-03-07 19:46:41 UTC) #86
Message was sent while issue was closed.
Committed patchset #17 (id:620001) as
https://chromium.googlesource.com/chromium/src/+/321a96f376e57651a1ad987f5585...

Powered by Google App Engine
This is Rietveld 408576698