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

Issue 9242018: Factor out chunk encoding logic into HttpStreamParser::EncodeChunk(). (Closed)

Created:
8 years, 11 months ago by satorux1
Modified:
8 years, 11 months ago
Reviewers:
Nico, Satish, wtc, eroman
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Factor out chunk encoding logic into HttpStreamParser::EncodeChunk(). The logic is meaty enough to be factored out. Add unit tests along the way. BUG=72001 TEST=add unit tests. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=118265

Patch Set 1 #

Total comments: 27

Patch Set 2 : address comments #

Patch Set 3 : fix net_unittests build #

Patch Set 4 : address comments in the unittest #

Patch Set 5 : fix the handling of the last chunk #

Patch Set 6 : rebased. #

Patch Set 7 : add NET_EXPORT_PRIVATE to fix windows builds #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+146 lines, -26 lines) Patch
M net/base/upload_data_stream.h View 1 2 chunks +4 lines, -4 lines 0 comments Download
M net/base/upload_data_stream.cc View 3 chunks +4 lines, -3 lines 1 comment Download
M net/http/http_stream_parser.h View 1 2 3 4 5 6 3 chunks +18 lines, -1 line 0 comments Download
M net/http/http_stream_parser.cc View 1 2 3 4 5 6 5 chunks +42 lines, -18 lines 0 comments Download
A net/http/http_stream_parser_unittest.cc View 1 2 3 1 chunk +77 lines, -0 lines 0 comments Download
M net/net.gyp View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
satorux1
8 years, 11 months ago (2012-01-17 20:52:22 UTC) #1
satorux1
adding wtc@
8 years, 11 months ago (2012-01-17 22:54:48 UTC) #2
wtc
Patch Set 1 LGTM. I suggest some changes below. http://codereview.chromium.org/9242018/diff/1/net/base/upload_data_stream.h File net/base/upload_data_stream.h (right): http://codereview.chromium.org/9242018/diff/1/net/base/upload_data_stream.h#newcode33 net/base/upload_data_stream.h:33: ...
8 years, 11 months ago (2012-01-18 22:49:24 UTC) #3
wtc
Two more nits. http://codereview.chromium.org/9242018/diff/1/net/http/http_stream_parser.cc File net/http/http_stream_parser.cc (right): http://codereview.chromium.org/9242018/diff/1/net/http/http_stream_parser.cc#newcode364 net/http/http_stream_parser.cc:364: EncodeChunk("", chunk_buf_->data(), kChunkBufferSize); Nit: it may ...
8 years, 11 months ago (2012-01-18 22:55:00 UTC) #4
satorux1
Thank you for the great feedback! https://chromiumcodereview.appspot.com/9242018/diff/1/net/base/upload_data_stream.h File net/base/upload_data_stream.h (right): https://chromiumcodereview.appspot.com/9242018/diff/1/net/base/upload_data_stream.h#newcode33 net/base/upload_data_stream.h:33: // with this ...
8 years, 11 months ago (2012-01-18 23:42:30 UTC) #5
satorux1
https://chromiumcodereview.appspot.com/9242018/diff/1/net/http/http_stream_parser.h File net/http/http_stream_parser.h (right): https://chromiumcodereview.appspot.com/9242018/diff/1/net/http/http_stream_parser.h#newcode84 net/http/http_stream_parser.h:84: // kChunkHeaderFooterSize. Returns -1 if |output_size| is not large ...
8 years, 11 months ago (2012-01-18 23:44:02 UTC) #6
satorux1
oops, forgot to check the comments in unittest.cc. Now these comments are also addressed. https://chromiumcodereview.appspot.com/9242018/diff/1/net/http/http_stream_parser_unittest.cc ...
8 years, 11 months ago (2012-01-19 00:07:41 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/satorux@chromium.org/9242018/8004
8 years, 11 months ago (2012-01-19 05:52:07 UTC) #8
commit-bot: I haz the power
Change committed as 118265
8 years, 11 months ago (2012-01-19 07:09:31 UTC) #9
Nico
8 years, 11 months ago (2012-01-19 15:09:06 UTC) #10
http://codereview.chromium.org/9242018/diff/8004/net/base/upload_data_stream.cc
File net/base/upload_data_stream.cc (right):

http://codereview.chromium.org/9242018/diff/8004/net/base/upload_data_stream....
net/base/upload_data_stream.cc:16: const size_t UploadDataStream::kBufferSize =
16384;
Since this is now in the cc file, it can't be inlined, which causes other files
that allocate static arrays with this size to have static initializers. See
http://build.chromium.org/f/chromium/perf/linux-release/sizes/report.html?his...

I'll revert this change for now.

Powered by Google App Engine
This is Rietveld 408576698