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

Issue 10689034: SPDY - chunked upload - speech recognition doesn't work with SPDY/3 (Closed)

Created:
8 years, 5 months ago by ramant (doing other things)
Modified:
8 years, 5 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, Ryan Sleevi
Visibility:
Public.

Description

SPDY - chunked upload - cleanup of spdy_http_stream to read the data in SendBody instead of SendBodyComplete. SpdyHttpStream inherits from ChunkCallback (SpdyStream doesn't inherit from ChunkCallback). OnChunkAvailable is handled by SpdyHttpStream. In unit tests, added new tests (similar to http_stream_parser_unittest for chunked uploads), to delay sending of chunked data. Also added sending of window_update during chunk uploads. Verified that these tests fail with the old code and run ok with the new changes. This change also fixed chunked uploads hanging (or stalling) for speech recgonition. Many many thanks to sleevi for suggesting the way to clean up the SpdyHttpStream's SendBody and SendBodyComplete code. R=rch@chromium.org, rsleevi@chromium.org TEST=network unit tests BUG=113107, 136044 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=146255

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 21

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Total comments: 14

Patch Set 7 : #

Total comments: 15

Patch Set 8 : #

Patch Set 9 : #

Total comments: 6

Patch Set 10 : #

Total comments: 2

Patch Set 11 : #

Patch Set 12 : #

Patch Set 13 : #

Total comments: 14

Patch Set 14 : #

Patch Set 15 : #

Patch Set 16 : #

Patch Set 17 : #

Patch Set 18 : #

Patch Set 19 : #

Patch Set 20 : #

Patch Set 21 : #

Patch Set 22 : #

Patch Set 23 : #

Total comments: 20

Patch Set 24 : #

Total comments: 6

Patch Set 25 : #

Total comments: 15

Patch Set 26 : #

Patch Set 27 : #

Total comments: 2

Patch Set 28 : #

Patch Set 29 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+556 lines, -132 lines) Patch
M net/base/upload_data_stream.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +8 lines, -2 lines 0 comments Download
M net/base/upload_data_stream.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +6 lines, -0 lines 0 comments Download
M net/spdy/spdy_http_stream.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 5 chunks +13 lines, -2 lines 0 comments Download
M net/spdy/spdy_http_stream.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 10 chunks +55 lines, -32 lines 0 comments Download
M net/spdy/spdy_http_stream_spdy2_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 3 chunks +154 lines, -6 lines 0 comments Download
M net/spdy/spdy_http_stream_spdy3_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 3 chunks +279 lines, -6 lines 0 comments Download
M net/spdy/spdy_network_transaction_spdy2_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 3 chunks +8 lines, -1 line 0 comments Download
M net/spdy/spdy_network_transaction_spdy3_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 6 chunks +24 lines, -34 lines 0 comments Download
M net/spdy/spdy_proxy_client_socket.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +0 lines, -1 line 0 comments Download
M net/spdy/spdy_proxy_client_socket.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +0 lines, -3 lines 0 comments Download
M net/spdy/spdy_session_spdy2_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +0 lines, -2 lines 0 comments Download
M net/spdy/spdy_session_spdy3_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +0 lines, -2 lines 0 comments Download
M net/spdy/spdy_stream.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 4 chunks +1 line, -9 lines 0 comments Download
M net/spdy/spdy_stream.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 7 chunks +8 lines, -23 lines 0 comments Download
M net/spdy/spdy_stream_spdy2_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +0 lines, -2 lines 0 comments Download
M net/spdy/spdy_stream_spdy3_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +0 lines, -2 lines 0 comments Download
M net/spdy/spdy_websocket_stream.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +0 lines, -1 line 0 comments Download
M net/spdy/spdy_websocket_stream.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +0 lines, -4 lines 0 comments Download

Messages

Total messages: 26 (0 generated)
ramant (doing other things)
Hi willchan and rch, Could you take a look this change to handle WINDOW_UPDATE messages ...
8 years, 5 months ago (2012-06-30 23:10:29 UTC) #1
Ryan Sleevi
https://chromiumcodereview.appspot.com/10689034/diff/5003/net/spdy/spdy_http_stream_spdy3_unittest.cc File net/spdy/spdy_http_stream_spdy3_unittest.cc (right): https://chromiumcodereview.appspot.com/10689034/diff/5003/net/spdy/spdy_http_stream_spdy3_unittest.cc#newcode225 net/spdy/spdy_http_stream_spdy3_unittest.cc:225: TestCompletionCallback callback0; nit: You can re-use existing TestCompletionCallbacks, which ...
8 years, 5 months ago (2012-07-02 21:52:46 UTC) #2
Ryan Hamilton
https://chromiumcodereview.appspot.com/10689034/diff/5003/net/spdy/spdy_http_stream_spdy2_unittest.cc File net/spdy/spdy_http_stream_spdy2_unittest.cc (right): https://chromiumcodereview.appspot.com/10689034/diff/5003/net/spdy/spdy_http_stream_spdy2_unittest.cc#newcode181 net/spdy/spdy_http_stream_spdy2_unittest.cc:181: TEST_F(SpdyHttpStreamSpdy2Test, DelayedSendChunkedPost) { Does this test fail when run ...
8 years, 5 months ago (2012-07-02 22:34:32 UTC) #3
Ryan Sleevi
I haven't closely looked at the tests, but I think the fix is spot on, ...
8 years, 5 months ago (2012-07-04 00:52:49 UTC) #4
ramant (doing other things)
Hi rch@ and sleevi@, We have rewritten this code (not much of the original code ...
8 years, 5 months ago (2012-07-04 21:04:32 UTC) #5
Ryan Sleevi
http://codereview.chromium.org/10689034/diff/1030/net/spdy/spdy_http_stream.cc File net/spdy/spdy_http_stream.cc (right): http://codereview.chromium.org/10689034/diff/1030/net/spdy/spdy_http_stream.cc#newcode245 net/spdy/spdy_http_stream.cc:245: DCHECK_EQ(static_cast<HttpResponseInfo*>(NULL), response_info_); style nit: this should be } else ...
8 years, 5 months ago (2012-07-05 06:52:06 UTC) #6
Ryan Sleevi
Hi Raman, I removed sleevi@c.o from the reviewers - since it's rsleevi@. I looked over ...
8 years, 5 months ago (2012-07-06 20:20:03 UTC) #7
Ryan Sleevi
http://codereview.chromium.org/10689034/diff/1030/net/spdy/spdy_http_stream_spdy2_unittest.cc File net/spdy/spdy_http_stream_spdy2_unittest.cc (right): http://codereview.chromium.org/10689034/diff/1030/net/spdy/spdy_http_stream_spdy2_unittest.cc#newcode295 net/spdy/spdy_http_stream_spdy2_unittest.cc:295: data->RunFor(1); I just realized there's another bug here in ...
8 years, 5 months ago (2012-07-06 21:04:45 UTC) #8
ramant (doing other things)
Hi Ryan Sleevi, Many many thanks for your comments. Spdy is slightly different with callback ...
8 years, 5 months ago (2012-07-06 22:55:42 UTC) #9
Ryan Sleevi
http://codereview.chromium.org/10689034/diff/16020/net/base/upload_data_stream.h File net/base/upload_data_stream.h (right): http://codereview.chromium.org/10689034/diff/16020/net/base/upload_data_stream.h#newcode82 net/base/upload_data_stream.h:82: FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionSpdy3Test, ChunkedPost); Sorry, what I was suggesting was an ...
8 years, 5 months ago (2012-07-06 23:15:49 UTC) #10
ramant (doing other things)
Hi Ryan Sleevi, Thanks much for your comments. Made the changes to upload_data_stream.h per your ...
8 years, 5 months ago (2012-07-07 04:47:05 UTC) #11
Ryan Hamilton
So as I understand the history of this CL, it includes fixes for two known ...
8 years, 5 months ago (2012-07-09 17:52:02 UTC) #12
ramant (doing other things)
Hi Ryan Hamilton, Wrote a test to test that the failure condition of old code ...
8 years, 5 months ago (2012-07-11 01:36:18 UTC) #13
Ryan Hamilton
http://codereview.chromium.org/10689034/diff/16054/net/spdy/spdy_http_stream_spdy2_unittest.cc File net/spdy/spdy_http_stream_spdy2_unittest.cc (right): http://codereview.chromium.org/10689034/diff/16054/net/spdy/spdy_http_stream_spdy2_unittest.cc#newcode127 net/spdy/spdy_http_stream_spdy2_unittest.cc:127: // requests with chunked uploads. Please remove this comment. ...
8 years, 5 months ago (2012-07-11 17:11:17 UTC) #14
Ryan Sleevi
http://codereview.chromium.org/10689034/diff/16054/net/spdy/spdy_http_stream_spdy2_unittest.cc File net/spdy/spdy_http_stream_spdy2_unittest.cc (right): http://codereview.chromium.org/10689034/diff/16054/net/spdy/spdy_http_stream_spdy2_unittest.cc#newcode286 net/spdy/spdy_http_stream_spdy2_unittest.cc:286: ASSERT_TRUE(callback.have_result()); drop this http://codereview.chromium.org/10689034/diff/16054/net/spdy/spdy_http_stream_spdy2_unittest.cc#newcode290 net/spdy/spdy_http_stream_spdy2_unittest.cc:290: ASSERT_TRUE(callback.have_result()); drop this http://codereview.chromium.org/10689034/diff/16054/net/spdy/spdy_http_stream_spdy2_unittest.cc#newcode294 ...
8 years, 5 months ago (2012-07-11 17:43:25 UTC) #15
ramant (doing other things)
http://codereview.chromium.org/10689034/diff/16054/net/spdy/spdy_http_stream_spdy2_unittest.cc File net/spdy/spdy_http_stream_spdy2_unittest.cc (right): http://codereview.chromium.org/10689034/diff/16054/net/spdy/spdy_http_stream_spdy2_unittest.cc#newcode127 net/spdy/spdy_http_stream_spdy2_unittest.cc:127: // requests with chunked uploads. On 2012/07/11 17:11:19, Ryan ...
8 years, 5 months ago (2012-07-11 19:40:43 UTC) #16
Ryan Sleevi
http://codereview.chromium.org/10689034/diff/4044/net/spdy/spdy_network_transaction_spdy3_unittest.cc File net/spdy/spdy_network_transaction_spdy3_unittest.cc (right): http://codereview.chromium.org/10689034/diff/4044/net/spdy/spdy_network_transaction_spdy3_unittest.cc#newcode2090 net/spdy/spdy_network_transaction_spdy3_unittest.cc:2090: EXPECT_EQ(ERR_IO_PENDING, rv); nit: ASSERT_EQ if !pending, then data->RunFor() may ...
8 years, 5 months ago (2012-07-11 19:54:25 UTC) #17
ramant (doing other things)
http://codereview.chromium.org/10689034/diff/4044/net/spdy/spdy_network_transaction_spdy3_unittest.cc File net/spdy/spdy_network_transaction_spdy3_unittest.cc (right): http://codereview.chromium.org/10689034/diff/4044/net/spdy/spdy_network_transaction_spdy3_unittest.cc#newcode2090 net/spdy/spdy_network_transaction_spdy3_unittest.cc:2090: EXPECT_EQ(ERR_IO_PENDING, rv); On 2012/07/11 19:54:25, Ryan Sleevi wrote: > ...
8 years, 5 months ago (2012-07-11 20:52:20 UTC) #18
Ryan Hamilton
Excellent progress! Only nits ... http://codereview.chromium.org/10689034/diff/8065/net/spdy/spdy_http_stream.h File net/spdy/spdy_http_stream.h (right): http://codereview.chromium.org/10689034/diff/8065/net/spdy/spdy_http_stream.h#newcode104 net/spdy/spdy_http_stream.h:104: // (which always returns ...
8 years, 5 months ago (2012-07-11 21:08:21 UTC) #19
Ryan Sleevi
Changes LGTM, and the change you proposed SGTM. http://codereview.chromium.org/10689034/diff/8065/net/spdy/spdy_http_stream.h File net/spdy/spdy_http_stream.h (right): http://codereview.chromium.org/10689034/diff/8065/net/spdy/spdy_http_stream.h#newcode104 net/spdy/spdy_http_stream.h:104: // ...
8 years, 5 months ago (2012-07-11 21:13:46 UTC) #20
ramant (doing other things)
http://codereview.chromium.org/10689034/diff/8065/net/spdy/spdy_http_stream.h File net/spdy/spdy_http_stream.h (right): http://codereview.chromium.org/10689034/diff/8065/net/spdy/spdy_http_stream.h#newcode104 net/spdy/spdy_http_stream.h:104: // (which always returns ERR_IO_PENDING). In the case of ...
8 years, 5 months ago (2012-07-11 22:02:21 UTC) #21
Ryan Hamilton
http://codereview.chromium.org/10689034/diff/8065/net/spdy/spdy_http_stream_spdy3_unittest.cc File net/spdy/spdy_http_stream_spdy3_unittest.cc (right): http://codereview.chromium.org/10689034/diff/8065/net/spdy/spdy_http_stream_spdy3_unittest.cc#newcode453 net/spdy/spdy_http_stream_spdy3_unittest.cc:453: // Now append the second chunk. This will enqueue ...
8 years, 5 months ago (2012-07-11 22:51:14 UTC) #22
ramant (doing other things)
http://codereview.chromium.org/10689034/diff/13032/net/spdy/spdy_http_stream.h File net/spdy/spdy_http_stream.h (right): http://codereview.chromium.org/10689034/diff/13032/net/spdy/spdy_http_stream.h#newcode104 net/spdy/spdy_http_stream.h:104: // This method always returns ERR_IO_PENDING. On 2012/07/11 22:51:15, ...
8 years, 5 months ago (2012-07-11 23:00:21 UTC) #23
Ryan Hamilton
LGTM - Looks like the 29th time was the charm :>
8 years, 5 months ago (2012-07-11 23:05:15 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rtenneti@chromium.org/10689034/13035
8 years, 5 months ago (2012-07-11 23:20:07 UTC) #25
commit-bot: I haz the power
8 years, 5 months ago (2012-07-12 01:00:45 UTC) #26
Change committed as 146255

Powered by Google App Engine
This is Rietveld 408576698