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

Issue 1662763002: [ON HOLD] Implement pull-based design for content decoding (Closed)

Created:
4 years, 10 months ago by xunjieli
Modified:
4 years, 1 month ago
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

[ON HOLD] Implement pull-based design for content decoding This CL implements a pull-based design for content decoding. This CL is based on an earlier prototype CL (crrev.com/1274863002 by ellyjones@). The design for this pull-based content decoding is proposed in crbug.com/474858. BUG=474859

Patch Set 1 : #

Total comments: 26

Patch Set 2 : Refactor common logic #

Total comments: 81

Patch Set 3 : Address comments #

Total comments: 58

Patch Set 4 : Remove new buffer class per Matt's suggestion #

Patch Set 5 : Address most of the comments. Still working on Sdch. #

Patch Set 6 : Mostly working. Need to address UMA and logs #

Patch Set 7 : fix content_decoder_tool #

Patch Set 8 : NET_EXPORT_PRIVATE #

Patch Set 9 : Remove IOBuffer change #

Patch Set 10 : hopefully this will compile #

Patch Set 11 : change method signature #

Patch Set 12 : fix compile on mac #

Total comments: 56

Patch Set 13 : Fix components_unittests #

Total comments: 25

Patch Set 14 : Address comments #

Total comments: 48

Patch Set 15 : address Matt's comments #

Total comments: 18

Patch Set 16 : Address Matt's comments #

Total comments: 2

Patch Set 17 : add filter_source_stream_unittest.cc and address other comments #

Total comments: 44

Patch Set 18 : Address Randy's comments #

Patch Set 19 : change to upstream/downstream #

Patch Set 20 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2910 lines, -5137 lines) Patch
M net/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +3 lines, -6 lines 0 comments Download
M net/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 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 15 16 17 18 19 1 chunk +3 lines, -0 lines 0 comments Download
D net/filter/brotli_filter.h View 1 2 1 chunk +0 lines, -17 lines 0 comments Download
D net/filter/brotli_filter.cc View 1 2 3 4 5 1 chunk +0 lines, -218 lines 0 comments Download
D net/filter/brotli_filter_disabled.cc View 1 2 1 chunk +0 lines, -13 lines 0 comments Download
D net/filter/brotli_filter_unittest.cc View 1 2 3 4 5 1 chunk +0 lines, -271 lines 0 comments Download
A net/filter/brotli_source_stream.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +21 lines, -0 lines 0 comments Download
A + net/filter/brotli_source_stream.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 5 chunks +60 lines, -91 lines 0 comments Download
A + net/filter/brotli_source_stream_disabled.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +5 lines, -8 lines 0 comments Download
A net/filter/brotli_source_stream_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +258 lines, -0 lines 0 comments Download
D net/filter/filter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -331 lines 0 comments Download
D net/filter/filter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -451 lines 0 comments Download
D net/filter/filter_unittest.cc View 1 2 1 chunk +0 lines, -213 lines 0 comments Download
D net/filter/gzip_filter.h View 1 2 1 chunk +0 lines, -151 lines 0 comments Download
D net/filter/gzip_filter.cc View 1 2 1 chunk +0 lines, -300 lines 0 comments Download
D net/filter/gzip_filter_unittest.cc View 1 2 3 4 1 chunk +0 lines, -389 lines 0 comments Download
A net/filter/gzip_source_stream.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +116 lines, -0 lines 0 comments Download
A net/filter/gzip_source_stream.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +235 lines, -0 lines 0 comments Download
A net/filter/gzip_source_stream_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +312 lines, -0 lines 0 comments Download
D net/filter/mock_filter_context.cc View 1 2 1 chunk +0 lines, -65 lines 0 comments Download
D net/filter/sdch_filter.h View 1 2 1 chunk +0 lines, -142 lines 0 comments Download
D net/filter/sdch_filter.cc View 1 2 1 chunk +0 lines, -568 lines 0 comments Download
D net/filter/sdch_filter_unittest.cc View 1 2 3 4 5 1 chunk +0 lines, -1413 lines 0 comments Download
A net/filter/sdch_policy_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +83 lines, -0 lines 0 comments Download
A net/filter/sdch_policy_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +174 lines, -0 lines 0 comments Download
A net/filter/sdch_policy_delegate_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +182 lines, -0 lines 0 comments Download
A net/filter/sdch_source_stream.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +149 lines, -0 lines 0 comments Download
A net/filter/sdch_source_stream.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +239 lines, -0 lines 0 comments Download
A net/filter/sdch_source_stream_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +515 lines, -0 lines 0 comments Download
M net/log/net_log_event_type_list.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -1 line 0 comments Download
M net/net.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +5 lines, -6 lines 0 comments Download
M net/net.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +13 lines, -14 lines 0 comments Download
M net/tools/content_decoder_tool/content_decoder_tool.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +119 lines, -34 lines 0 comments Download
M net/url_request/url_request_file_job.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +4 lines, -1 line 0 comments Download
M net/url_request/url_request_file_job.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +11 lines, -8 lines 0 comments Download
M net/url_request/url_request_http_job.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 6 chunks +6 lines, -5 lines 0 comments Download
M net/url_request/url_request_http_job.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 7 chunks +114 lines, -75 lines 0 comments Download
M net/url_request/url_request_http_job_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +73 lines, -11 lines 0 comments Download
M net/url_request/url_request_job.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 7 chunks +29 lines, -53 lines 0 comments Download
M net/url_request/url_request_job.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 16 chunks +133 lines, -276 lines 0 comments Download
M net/url_request/url_request_job_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 9 chunks +46 lines, -5 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 129 (84 generated)
xunjieli
Hey Randy, here's a first draft. Not quite ready for review yet, though tests are ...
4 years, 10 months ago (2016-02-03 20:51:50 UTC) #5
Randy Smith (Not in Mondays)
Matt: I've cc'd you in because I'd like your eyes to pass over the architectural ...
4 years, 10 months ago (2016-02-08 23:28:42 UTC) #6
Randy Smith (Not in Mondays)
On 2016/02/08 23:28:42, Randy Smith - Not in Fridays wrote: > Matt: I've cc'd you ...
4 years, 10 months ago (2016-02-08 23:30:16 UTC) #7
mmenke
Sorry I didn't chime in on this CL earlier - been in my queue, but ...
4 years, 10 months ago (2016-02-18 16:26:59 UTC) #8
Randy Smith (Not in Mondays)
On 2016/02/18 16:26:59, mmenke wrote: > Sorry I didn't chime in on this CL earlier ...
4 years, 10 months ago (2016-02-18 16:31:04 UTC) #9
mmenke
On 2016/02/08 23:28:42, Randy Smith - Not in Fridays wrote: > Matt: I've cc'd you ...
4 years, 10 months ago (2016-02-18 22:58:09 UTC) #10
mmenke
https://codereview.chromium.org/1662763002/diff/60001/net/filter/stream_source.cc File net/filter/stream_source.cc (right): https://codereview.chromium.org/1662763002/diff/60001/net/filter/stream_source.cc#newcode91 net/filter/stream_source.cc:91: current = BuildSource(std::move(current), type, sdch_delegate); if current ever ends ...
4 years, 10 months ago (2016-02-18 22:58:28 UTC) #12
xunjieli
Thanks for the feedback! I think I have incorporated the comments where I can. Specifically ...
4 years, 9 months ago (2016-03-03 23:00:09 UTC) #14
Randy Smith (Not in Mondays)
My apologies, but I won't be able to do a re-review until Monday or Tuesday. ...
4 years, 9 months ago (2016-03-03 23:05:48 UTC) #15
xunjieli
On 2016/03/03 23:05:48, Randy Smith - Not in Fridays wrote: > My apologies, but I ...
4 years, 9 months ago (2016-03-03 23:07:45 UTC) #16
mmenke
On 2016/03/03 23:07:45, xunjieli wrote: > On 2016/03/03 23:05:48, Randy Smith - Not in Fridays ...
4 years, 9 months ago (2016-03-03 23:09:19 UTC) #17
mmenke
Nothing close to a full review. https://codereview.chromium.org/1662763002/diff/100001/net/filter/gzip_stream_source.cc File net/filter/gzip_stream_source.cc (right): https://codereview.chromium.org/1662763002/diff/100001/net/filter/gzip_stream_source.cc#newcode125 net/filter/gzip_stream_source.cc:125: // Sometime misconfigured ...
4 years, 9 months ago (2016-03-04 21:15:57 UTC) #18
Randy Smith (Not in Mondays)
I've focussed on the StreamSource abstraction in this review; once we have that basically settled, ...
4 years, 9 months ago (2016-03-09 23:03:57 UTC) #19
mmenke
https://codereview.chromium.org/1662763002/diff/100001/net/filter/stream_source.cc File net/filter/stream_source.cc (right): https://codereview.chromium.org/1662763002/diff/100001/net/filter/stream_source.cc#newcode39 net/filter/stream_source.cc:39: } On 2016/03/09 23:03:56, Randy Smith - Not in ...
4 years, 9 months ago (2016-03-09 23:11:50 UTC) #20
mmenke
Helen: Any idea when you'll be getting back to this? I think we should have ...
4 years, 9 months ago (2016-03-25 20:25:38 UTC) #21
xunjieli
On 2016/03/25 20:25:38, mmenke wrote: > Helen: Any idea when you'll be getting back to ...
4 years, 9 months ago (2016-03-25 20:28:10 UTC) #22
xunjieli
On 2016/03/25 20:28:10, xunjieli wrote: > On 2016/03/25 20:25:38, mmenke wrote: > > Helen: Any ...
4 years, 8 months ago (2016-04-04 18:47:27 UTC) #23
mmenke
On 2016/04/04 18:47:27, xunjieli wrote: > On 2016/03/25 20:28:10, xunjieli wrote: > > On 2016/03/25 ...
4 years, 8 months ago (2016-04-04 19:14:13 UTC) #24
Randy Smith (Not in Mondays)
This CL is in the "important but not urgent" category, which makes me not worry ...
4 years, 8 months ago (2016-04-04 19:18:17 UTC) #25
xunjieli
Thanks! I think I have addressed all comments except those about UMA stats gathering. I ...
4 years, 8 months ago (2016-04-20 19:16:11 UTC) #26
Randy Smith (Not in Mondays)
Helen: Here's my next round of review. Most of my comments are on the base ...
4 years, 8 months ago (2016-04-26 21:54:02 UTC) #27
mmenke
Plan to do a more complete review Monday. https://codereview.chromium.org/1662763002/diff/120001/net/filter/block_buffer.h File net/filter/block_buffer.h (right): https://codereview.chromium.org/1662763002/diff/120001/net/filter/block_buffer.h#newcode18 net/filter/block_buffer.h:18: class ...
4 years, 7 months ago (2016-04-29 19:10:54 UTC) #28
mmenke
Sorry, completely forgot about this. I'll do another round today or tomorrow.
4 years, 6 months ago (2016-06-15 16:26:42 UTC) #31
mmenke
On 2016/06/15 16:26:42, mmenke wrote: > Sorry, completely forgot about this. I'll do another round ...
4 years, 6 months ago (2016-06-15 16:29:00 UTC) #32
xunjieli
Thank you both very much for the review. I believe I have addressed all of ...
4 years, 5 months ago (2016-07-20 21:00:48 UTC) #39
xunjieli
+eustas@: PTAL at Brotli-related code. If you have any suggestions on other parts of the ...
4 years, 5 months ago (2016-07-21 13:36:38 UTC) #51
mmenke
A bunch of nits, strewn across your last two CLs (oops!). I'm planning to carefully ...
4 years, 5 months ago (2016-07-21 18:14:10 UTC) #57
Randy Smith (Not in Mondays)
Helen: I'm feeling snowed by some high priority reviews and personal stuff, and am about ...
4 years, 5 months ago (2016-07-21 18:19:52 UTC) #58
xunjieli
On 2016/07/21 18:19:52, Randy Smith - Not in Fridays wrote: > Helen: I'm feeling snowed ...
4 years, 5 months ago (2016-07-21 18:24:53 UTC) #59
eustas
https://codereview.chromium.org/1662763002/diff/440001/net/docs/filter.md File net/docs/filter.md (right): https://codereview.chromium.org/1662763002/diff/440001/net/docs/filter.md#newcode7 net/docs/filter.md:7: * brotili (handling "br" Content-Encoding) s/brotili/brotli https://codereview.chromium.org/1662763002/diff/440001/net/filter/brotli_stream_source.cc File net/filter/brotli_stream_source.cc ...
4 years, 5 months ago (2016-07-22 12:29:19 UTC) #60
xunjieli
Thanks a lot for the comments mmenke@ and eustas@! I have uploaded a new patch. ...
4 years, 4 months ago (2016-07-27 20:32:05 UTC) #82
mmenke
https://codereview.chromium.org/1662763002/diff/440001/net/url_request/url_request_job.h File net/url_request/url_request_job.h (right): https://codereview.chromium.org/1662763002/diff/440001/net/url_request/url_request_job.h#newcode152 net/url_request/url_request_job.h:152: virtual std::unique_ptr<StreamSource> SetupSource(); On 2016/07/27 20:32:05, xunjieli wrote: > ...
4 years, 4 months ago (2016-07-28 18:40:14 UTC) #83
xunjieli
Thank you very much for the review! I've uploaded a new patch to address the ...
4 years, 4 months ago (2016-08-01 16:46:24 UTC) #85
mmenke
A couple quick comments. Think this will be my last set of comments, I'll leave ...
4 years, 4 months ago (2016-08-01 21:55:30 UTC) #90
xunjieli
Thank you very much for the review! I have addressed all comments expect the one ...
4 years, 4 months ago (2016-08-02 13:44:32 UTC) #94
xunjieli
Hello mmenke@, rdsmith@, eustas@: M54 is going to be cut on 08/25. The change is ...
4 years, 4 months ago (2016-08-02 14:00:15 UTC) #95
eustas
https://codereview.chromium.org/1662763002/diff/600001/net/filter/brotli_source_stream.cc File net/filter/brotli_source_stream.cc (right): https://codereview.chromium.org/1662763002/diff/600001/net/filter/brotli_source_stream.cc#newcode126 net/filter/brotli_source_stream.cc:126: decoding_status_ = DecodingStatus::DECODING_IN_PROGRESS; I suppose BROTLI_RESULT_NEEDS_MORE_OUTPUT should not cause ...
4 years, 4 months ago (2016-08-02 14:43:33 UTC) #96
mmenke
Should we have tests for FilterStreamSource, to make sure we have all the cases covered ...
4 years, 4 months ago (2016-08-02 14:46:39 UTC) #97
xunjieli
> Should we have tests for FilterStreamSource, to make sure we have all the cases ...
4 years, 4 months ago (2016-08-02 22:26:08 UTC) #103
Randy Smith (Not in Mondays)
Initial comments on the core classes ({Filter,}SourceStream, URLRequestJob, a few parts of URLRequestHttpJob). Very nice! ...
4 years, 4 months ago (2016-08-09 20:28:31 UTC) #106
xunjieli
Thanks for the review! PTAL. https://codereview.chromium.org/1662763002/diff/640001/net/filter/filter_source_stream.cc File net/filter/filter_source_stream.cc (right): https://codereview.chromium.org/1662763002/diff/640001/net/filter/filter_source_stream.cc#newcode39 net/filter/filter_source_stream.cc:39: input_buffer_ = new IOBufferWithSize(kBufferSize); ...
4 years, 4 months ago (2016-08-15 15:19:08 UTC) #107
mmenke
Hrm...For landing this, should we land one SourceStream class at a time, and then the ...
4 years, 4 months ago (2016-08-16 21:35:28 UTC) #112
xunjieli
Thanks very much for the review! I've uploaded a new patch which changed the terminology ...
4 years, 4 months ago (2016-08-16 22:18:25 UTC) #113
Randy Smith (Not in Mondays)
Responses to comments here; now moving to review 2251853002, which is presumably where the action ...
4 years, 4 months ago (2016-08-22 18:12:31 UTC) #127
Randy Smith (Not in Mondays)
4 years, 4 months ago (2016-08-22 22:04:32 UTC) #128
Followup on naming, on this CL since it's where we were having the original
discussion.

https://codereview.chromium.org/1662763002/diff/640001/net/filter/source_stre...
File net/filter/source_stream.h (right):

https://codereview.chromium.org/1662763002/diff/640001/net/filter/source_stre...
net/filter/source_stream.h:53: virtual std::string OrderedTypeStringList()
const;
On 2016/08/15 15:19:08, xunjieli(OOO-8.21-8.26) wrote:
> On 2016/08/09 20:28:30, Randy Smith - Not in Fridays wrote:
> > Why is this named OrderedTypeStringList()?  I'm not sure what that name
means.
> 
> This is moved over from the original code.
> The original name is:
> 
> std::string OrderedFilterList() const;
> 
> https://cs.chromium.org/chromium/src/net/filter/filter.h?rcl=0&l=238

Yeah, but that code was more explicit about filters being in a chain.  This code
is being a little more abstract; at each level the SourceStream looks opaque to
what calls it; it's just a producer of bytes.  And this is really nothing more
than a string that describes the stream.  So I'd vote in favor of just calling
it "Description()" and commenting that this is for UMA and net logging.

ETA: Actually, it looks like it's used for testing as well (which scares me a
bit, but I'm not going to worry about that for now).

Powered by Google App Engine
This is Rietveld 408576698