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

Issue 1992953004: [Cronet] Make delaying sending request headers explicit in bidirectional stream (Closed)

Created:
4 years, 7 months ago by xunjieli
Modified:
4 years, 6 months ago
Reviewers:
kapishnikov, mef
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Cronet]Make delaying sending request headers explicit in bidirectional stream Always delaying sending request headers when disableAutoFlush is not safe (in the case of bidirectional streaming). Because server might be expecting request headers before sending a response, while client might only call SendData/SendvData after server responds. This CL adds an explicit flag to tell net::BidirectionalStream when to delay sending request headers and coalesce them with data frames in SendData/SendvData. BUG=599902 Committed: https://crrev.com/bcb0f86e685b9d603bebb97e9574e2e0e32948c2 Cr-Commit-Position: refs/heads/master@{#397567}

Patch Set 1 #

Patch Set 2 : self review #

Total comments: 3

Patch Set 3 : Address Andrei's and Misha's comments #

Patch Set 4 : Rebased #

Patch Set 5 : Address comments #

Patch Set 6 : self review #

Patch Set 7 : Add one more test #

Patch Set 8 : Fix compile error #

Total comments: 5

Patch Set 9 : Address Andrei's comment and self review #

Total comments: 32

Patch Set 10 : Address Misha's comments #

Patch Set 11 : correct a typo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+756 lines, -206 lines) Patch
M components/cronet/android/api/src/org/chromium/net/BidirectionalStream.java View 1 2 3 4 5 6 7 8 9 10 4 chunks +24 lines, -3 lines 0 comments Download
M components/cronet/android/api/src/org/chromium/net/CronetEngine.java View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -1 line 0 comments Download
M components/cronet/android/api/src/org/chromium/net/JavaCronetEngine.java View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M components/cronet/android/cronet_bidirectional_stream_adapter.h View 1 2 3 4 5 6 7 8 9 5 chunks +17 lines, -3 lines 0 comments Download
M components/cronet/android/cronet_bidirectional_stream_adapter.cc View 1 2 3 4 5 5 chunks +34 lines, -7 lines 0 comments Download
M components/cronet/android/java/src/org/chromium/net/CronetBidirectionalStream.java View 1 2 3 4 5 6 7 8 9 14 chunks +45 lines, -17 lines 0 comments Download
M components/cronet/android/java/src/org/chromium/net/CronetUrlRequestContext.java View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -2 lines 0 comments Download
M components/cronet/android/test/javatests/src/org/chromium/net/BidirectionalStreamQuicTest.java View 1 2 3 4 5 6 7 8 9 2 chunks +134 lines, -47 lines 0 comments Download
M components/cronet/android/test/javatests/src/org/chromium/net/BidirectionalStreamTest.java View 1 2 3 4 5 6 7 8 9 2 chunks +119 lines, -26 lines 0 comments Download
M components/cronet/ios/cronet_bidirectional_stream.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M components/cronet/ios/cronet_bidirectional_stream.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M net/http/bidirectional_stream.h View 1 2 3 4 5 6 7 8 9 6 chunks +27 lines, -5 lines 0 comments Download
M net/http/bidirectional_stream.cc View 1 2 3 4 5 6 7 8 9 4 chunks +18 lines, -9 lines 0 comments Download
M net/http/bidirectional_stream_impl.h View 1 2 3 4 5 6 7 8 9 2 chunks +20 lines, -2 lines 0 comments Download
M net/http/bidirectional_stream_unittest.cc View 1 2 3 4 5 6 7 8 9 5 chunks +8 lines, -10 lines 0 comments Download
M net/http/http_stream_factory_impl_unittest.cc View 1 2 3 4 3 chunks +5 lines, -3 lines 0 comments Download
M net/quic/bidirectional_stream_quic_impl.h View 1 2 3 4 5 6 7 8 9 3 chunks +7 lines, -4 lines 0 comments Download
M net/quic/bidirectional_stream_quic_impl.cc View 1 2 3 4 5 6 7 8 9 7 chunks +35 lines, -24 lines 0 comments Download
M net/quic/bidirectional_stream_quic_impl_unittest.cc View 1 2 3 4 5 6 9 chunks +226 lines, -18 lines 0 comments Download
M net/spdy/bidirectional_stream_spdy_impl.h View 1 2 3 4 5 3 chunks +4 lines, -5 lines 0 comments Download
M net/spdy/bidirectional_stream_spdy_impl.cc View 1 2 3 4 5 6 7 8 10 chunks +20 lines, -17 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 26 (11 generated)
xunjieli
Hi Misha and Andrei, this is for internal bug: 28851164. A bit more context. There ...
4 years, 7 months ago (2016-05-19 22:41:21 UTC) #4
xunjieli
Pinging Misha and Andrei! Any chance we can get this in this week's Dev release? ...
4 years, 7 months ago (2016-05-23 13:09:17 UTC) #6
mef
On 2016/05/23 13:09:17, xunjieli wrote: > Pinging Misha and Andrei! Any chance we can get ...
4 years, 7 months ago (2016-05-23 14:46:40 UTC) #7
mef
Need crbug number. Would it make sense to always delay sending headers if disableAutoFlash is ...
4 years, 7 months ago (2016-05-23 14:57:26 UTC) #8
xunjieli
Thanks Misha and Andrei for the suggestions. I believe I have modified the CL according ...
4 years, 7 months ago (2016-05-25 14:26:26 UTC) #10
kapishnikov
https://codereview.chromium.org/1992953004/diff/140001/components/cronet/android/java/src/org/chromium/net/CronetBidirectionalStream.java File components/cronet/android/java/src/org/chromium/net/CronetBidirectionalStream.java (right): https://codereview.chromium.org/1992953004/diff/140001/components/cronet/android/java/src/org/chromium/net/CronetBidirectionalStream.java#newcode326 components/cronet/android/java/src/org/chromium/net/CronetBidirectionalStream.java:326: } Should we change mWriteState to State.WRITING_DONE if the ...
4 years, 6 months ago (2016-05-31 18:42:12 UTC) #11
xunjieli
Thanks for the review! PTAL https://codereview.chromium.org/1992953004/diff/140001/components/cronet/android/java/src/org/chromium/net/CronetBidirectionalStream.java File components/cronet/android/java/src/org/chromium/net/CronetBidirectionalStream.java (right): https://codereview.chromium.org/1992953004/diff/140001/components/cronet/android/java/src/org/chromium/net/CronetBidirectionalStream.java#newcode326 components/cronet/android/java/src/org/chromium/net/CronetBidirectionalStream.java:326: } On 2016/05/31 18:42:12, ...
4 years, 6 months ago (2016-05-31 19:31:53 UTC) #12
kapishnikov
Looks good. LGTM https://codereview.chromium.org/1992953004/diff/140001/components/cronet/android/java/src/org/chromium/net/CronetBidirectionalStream.java File components/cronet/android/java/src/org/chromium/net/CronetBidirectionalStream.java (right): https://codereview.chromium.org/1992953004/diff/140001/components/cronet/android/java/src/org/chromium/net/CronetBidirectionalStream.java#newcode330 components/cronet/android/java/src/org/chromium/net/CronetBidirectionalStream.java:330: assert !(mPendingData.isEmpty() && mFlushData.isEmpty()); On 2016/05/31 ...
4 years, 6 months ago (2016-05-31 19:47:24 UTC) #13
mef
Mostly nits and questions. I'm yet to review bidirectional_stream_quic_impl_unittest.cc. https://codereview.chromium.org/1992953004/diff/160001/components/cronet/android/api/src/org/chromium/net/BidirectionalStream.java File components/cronet/android/api/src/org/chromium/net/BidirectionalStream.java (right): https://codereview.chromium.org/1992953004/diff/160001/components/cronet/android/api/src/org/chromium/net/BidirectionalStream.java#newcode400 components/cronet/android/api/src/org/chromium/net/BidirectionalStream.java:400: ...
4 years, 6 months ago (2016-06-01 21:33:21 UTC) #14
xunjieli
Thanks for the review! https://codereview.chromium.org/1992953004/diff/160001/components/cronet/android/api/src/org/chromium/net/BidirectionalStream.java File components/cronet/android/api/src/org/chromium/net/BidirectionalStream.java (right): https://codereview.chromium.org/1992953004/diff/160001/components/cronet/android/api/src/org/chromium/net/BidirectionalStream.java#newcode400 components/cronet/android/api/src/org/chromium/net/BidirectionalStream.java:400: * Flushes pending writes. This ...
4 years, 6 months ago (2016-06-01 22:27:18 UTC) #16
mef
lgtm, thanks for your patience! Maybe add [Cronet] and/or bidirectional stream to description?
4 years, 6 months ago (2016-06-02 20:58:46 UTC) #17
xunjieli
On 2016/06/02 20:58:46, mef wrote: > lgtm, thanks for your patience! > > Maybe add ...
4 years, 6 months ago (2016-06-02 21:12:32 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1992953004/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1992953004/220001
4 years, 6 months ago (2016-06-02 21:14:15 UTC) #22
commit-bot: I haz the power
Committed patchset #11 (id:220001)
4 years, 6 months ago (2016-06-03 00:49:42 UTC) #24
commit-bot: I haz the power
4 years, 6 months ago (2016-06-03 00:50:49 UTC) #26
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/bcb0f86e685b9d603bebb97e9574e2e0e32948c2
Cr-Commit-Position: refs/heads/master@{#397567}

Powered by Google App Engine
This is Rietveld 408576698