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

Issue 1452823011: Make PacketReader/PacketWriter interfaces async-only. (Closed)

Created:
5 years, 1 month ago by Kevin M
Modified:
5 years ago
Reviewers:
haibinlu, Wez
CC:
cbentzel+watch_chromium.org, chromium-reviews, dtrainor+watch-blimp_chromium.org, kmarshall+watch-blimp_chromium.org, maniscalco+watch-blimp_chromium.org, marcinjb+watch-blimp_chromium.org, nyquist+watch-blimp_chromium.org, sriramsr+watch-blimp_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make PacketReader/PacketWriter interfaces async-only. Adapts synchronous I/O completion to use callbacks, so downstream callers are insulated from having to manage the complexities of mixed sync and async I/O. Updated logic of all PacketReader/PacketWriter dependents. R=haibinlu@chromium.org,wez@chromium.org BUG=558643 Committed: https://crrev.com/840a0fe2a4cab8709b5d29b89cdb968b620953ff Cr-Commit-Position: refs/heads/master@{#362833}

Patch Set 1 #

Total comments: 8

Patch Set 2 : Address wez feedback #

Patch Set 3 : Resync #

Patch Set 4 : Resync #

Total comments: 13

Patch Set 5 : Address wez feedback #

Total comments: 8

Patch Set 6 : Address wez,haibin feedback #

Total comments: 10

Patch Set 7 : Wez feedback #

Patch Set 8 : Rehabbed tests, addressed feedback, made changes to BlimpMessagePump #

Total comments: 10

Patch Set 9 : Wez feedback #

Patch Set 10 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+190 lines, -363 lines) Patch
M blimp/net/blimp_connection.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -9 lines 0 comments Download
M blimp/net/blimp_connection_unittest.cc View 1 2 3 4 5 6 7 5 chunks +15 lines, -90 lines 0 comments Download
M blimp/net/blimp_message_pump.h View 1 2 3 4 5 6 7 8 2 chunks +10 lines, -5 lines 0 comments Download
M blimp/net/blimp_message_pump.cc View 1 2 3 4 5 6 7 1 chunk +14 lines, -26 lines 0 comments Download
M blimp/net/blimp_message_pump_unittest.cc View 1 2 3 4 5 6 7 2 chunks +36 lines, -85 lines 0 comments Download
M blimp/net/packet_reader.h View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -8 lines 0 comments Download
M blimp/net/packet_writer.h View 1 2 3 4 5 6 1 chunk +5 lines, -8 lines 0 comments Download
M blimp/net/stream_packet_reader.h View 1 chunk +2 lines, -2 lines 0 comments Download
M blimp/net/stream_packet_reader.cc View 1 4 chunks +10 lines, -9 lines 0 comments Download
M blimp/net/stream_packet_reader_unittest.cc View 1 19 chunks +44 lines, -55 lines 0 comments Download
M blimp/net/stream_packet_writer.h View 1 chunk +2 lines, -2 lines 0 comments Download
M blimp/net/stream_packet_writer.cc View 1 2 3 4 5 2 chunks +11 lines, -15 lines 0 comments Download
M blimp/net/stream_packet_writer_unittest.cc View 1 2 3 4 10 chunks +16 lines, -42 lines 0 comments Download
M blimp/net/test_common.h View 1 2 3 4 5 6 7 8 9 6 chunks +15 lines, -7 lines 0 comments Download

Messages

Total messages: 31 (9 generated)
Kevin M
5 years, 1 month ago (2015-11-20 21:47:33 UTC) #1
Wez
https://codereview.chromium.org/1452823011/diff/1/blimp/net/packet_reader.h File blimp/net/packet_reader.h (right): https://codereview.chromium.org/1452823011/diff/1/blimp/net/packet_reader.h#newcode22 blimp/net/packet_reader.h:22: // executed successfully. All other values indicate errors. nit: ...
5 years, 1 month ago (2015-11-20 23:42:13 UTC) #3
Kevin M
https://codereview.chromium.org/1452823011/diff/1/blimp/net/packet_reader.h File blimp/net/packet_reader.h (right): https://codereview.chromium.org/1452823011/diff/1/blimp/net/packet_reader.h#newcode22 blimp/net/packet_reader.h:22: // executed successfully. All other values indicate errors. On ...
5 years ago (2015-11-24 21:34:36 UTC) #4
Kevin M
5 years ago (2015-11-24 21:42:27 UTC) #5
Wez
https://codereview.chromium.org/1452823011/diff/60001/blimp/net/packet_reader.h File blimp/net/packet_reader.h (right): https://codereview.chromium.org/1452823011/diff/60001/blimp/net/packet_reader.h#newcode21 blimp/net/packet_reader.h:21: // Passes net::OK to |cb| if the read operation ...
5 years ago (2015-11-24 23:43:18 UTC) #6
Kevin M
https://codereview.chromium.org/1452823011/diff/60001/blimp/net/packet_reader.h File blimp/net/packet_reader.h (right): https://codereview.chromium.org/1452823011/diff/60001/blimp/net/packet_reader.h#newcode21 blimp/net/packet_reader.h:21: // Passes net::OK to |cb| if the read operation ...
5 years ago (2015-11-25 01:18:37 UTC) #7
Wez
lgtm https://codereview.chromium.org/1452823011/diff/80001/blimp/net/blimp_message_pump.cc File blimp/net/blimp_message_pump.cc (right): https://codereview.chromium.org/1452823011/diff/80001/blimp/net/blimp_message_pump.cc#newcode70 blimp/net/blimp_message_pump.cc:70: DCHECK_EQ(result, net::OK); nit: DCHECK_EQ(net::OK, result) https://codereview.chromium.org/1452823011/diff/80001/blimp/net/stream_packet_writer.cc File blimp/net/stream_packet_writer.cc ...
5 years ago (2015-11-25 02:21:28 UTC) #8
Wez
Do we really need this, or could we instead have simple helpers that wrap a ...
5 years ago (2015-11-25 02:23:13 UTC) #9
haibinlu
https://codereview.chromium.org/1452823011/diff/80001/blimp/net/blimp_message_pump.cc File blimp/net/blimp_message_pump.cc (right): https://codereview.chromium.org/1452823011/diff/80001/blimp/net/blimp_message_pump.cc#newcode48 blimp/net/blimp_message_pump.cc:48: // The result is the size of the packet ...
5 years ago (2015-11-25 19:10:33 UTC) #10
Kevin M
IMO, having interfaces that expose mixed sync/async seems to be more of a burden than ...
5 years ago (2015-11-30 19:14:48 UTC) #11
Kevin M
https://codereview.chromium.org/1452823011/diff/80001/blimp/net/blimp_message_pump.cc File blimp/net/blimp_message_pump.cc (right): https://codereview.chromium.org/1452823011/diff/80001/blimp/net/blimp_message_pump.cc#newcode48 blimp/net/blimp_message_pump.cc:48: // The result is the size of the packet ...
5 years ago (2015-11-30 19:25:14 UTC) #12
Wez
https://codereview.chromium.org/1452823011/diff/100001/blimp/net/blimp_connection.cc File blimp/net/blimp_connection.cc (right): https://codereview.chromium.org/1452823011/diff/100001/blimp/net/blimp_connection.cc#newcode75 blimp/net/blimp_connection.cc:75: write_packet_callback_.Reset(base::Bind( You only need write_packet_callback_ to ensure that any ...
5 years ago (2015-11-30 21:33:24 UTC) #13
haibinlu
lgtm
5 years ago (2015-11-30 21:50:31 UTC) #14
Kevin M
https://codereview.chromium.org/1452823011/diff/100001/blimp/net/blimp_connection.cc File blimp/net/blimp_connection.cc (right): https://codereview.chromium.org/1452823011/diff/100001/blimp/net/blimp_connection.cc#newcode75 blimp/net/blimp_connection.cc:75: write_packet_callback_.Reset(base::Bind( On 2015/11/30 21:33:24, Wez wrote: > You only ...
5 years ago (2015-12-01 01:50:27 UTC) #15
Kevin M
Haibin/Wez, I had to make some additional changes to the test code, some of which ...
5 years ago (2015-12-01 19:30:09 UTC) #17
Wez
https://codereview.chromium.org/1452823011/diff/140001/blimp/net/blimp_message_pump.h File blimp/net/blimp_message_pump.h (right): https://codereview.chromium.org/1452823011/diff/140001/blimp/net/blimp_message_pump.h#newcode56 blimp/net/blimp_message_pump.h:56: net::CancelableCompletionCallback process_msg_callback_; nit: It would be helpful to have ...
5 years ago (2015-12-01 22:34:45 UTC) #18
Kevin M
https://codereview.chromium.org/1452823011/diff/140001/blimp/net/blimp_message_pump.h File blimp/net/blimp_message_pump.h (right): https://codereview.chromium.org/1452823011/diff/140001/blimp/net/blimp_message_pump.h#newcode56 blimp/net/blimp_message_pump.h:56: net::CancelableCompletionCallback process_msg_callback_; On 2015/12/01 22:34:45, Wez wrote: > nit: ...
5 years ago (2015-12-02 02:02:37 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1452823011/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1452823011/160001
5 years ago (2015-12-02 19:25:22 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/101933) mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, ...
5 years ago (2015-12-02 19:31:43 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1452823011/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1452823011/180001
5 years ago (2015-12-02 23:26:45 UTC) #27
commit-bot: I haz the power
Committed patchset #10 (id:180001)
5 years ago (2015-12-03 00:30:07 UTC) #29
commit-bot: I haz the power
5 years ago (2015-12-03 00:31:05 UTC) #31
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/840a0fe2a4cab8709b5d29b89cdb968b620953ff
Cr-Commit-Position: refs/heads/master@{#362833}

Powered by Google App Engine
This is Rietveld 408576698