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

Issue 1585403004: Pass the content size in the content-length header for file:// streams.

Created:
4 years, 11 months ago by Lei Zhang
Modified:
4 years, 7 months ago
CC:
chromium-reviews, loading-reviews_chromium.org, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Pass the content size in the content-length header for file:// streams. BUG=577981

Patch Set 1 #

Patch Set 2 : int64 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -0 lines) Patch
M content/browser/loader/resource_dispatcher_host_impl.cc View 1 1 chunk +5 lines, -0 lines 5 comments Download

Messages

Total messages: 27 (2 generated)
jbreiden
lgtm
4 years, 11 months ago (2016-01-15 22:07:49 UTC) #2
Lei Zhang
+zork who I believe originally wrote this block of code +mmenk for OWNERS
4 years, 11 months ago (2016-01-15 22:10:24 UTC) #4
Lei Zhang
On 2016/01/15 22:10:24, Lei Zhang wrote: > +mmenk for OWNERS +mmenke, even
4 years, 11 months ago (2016-01-15 22:10:39 UTC) #5
mmenke
https://codereview.chromium.org/1585403004/diff/20001/content/browser/loader/resource_dispatcher_host_impl.cc File content/browser/loader/resource_dispatcher_host_impl.cc (right): https://codereview.chromium.org/1585403004/diff/20001/content/browser/loader/resource_dispatcher_host_impl.cc#newcode832 content/browser/loader/resource_dispatcher_host_impl.cc:832: base::Int64ToString(response->head.content_length)); The PDF viewer uses the content-length header to ...
4 years, 11 months ago (2016-01-15 22:20:59 UTC) #6
mmenke
https://codereview.chromium.org/1585403004/diff/20001/content/browser/loader/resource_dispatcher_host_impl.cc File content/browser/loader/resource_dispatcher_host_impl.cc (right): https://codereview.chromium.org/1585403004/diff/20001/content/browser/loader/resource_dispatcher_host_impl.cc#newcode832 content/browser/loader/resource_dispatcher_host_impl.cc:832: base::Int64ToString(response->head.content_length)); On 2016/01/15 22:20:59, mmenke wrote: > The PDF ...
4 years, 11 months ago (2016-01-15 22:29:14 UTC) #7
jbreiden
This is where PDF uses content-length for memory allocation. https://code.google.com/p/chromium/codesearch#chromium/src/pdf/document_loader.cc&sq=package:chromium&type=cs&l=161
4 years, 11 months ago (2016-01-15 22:34:08 UTC) #8
jbreiden
This is where PDF uses content-length for memory allocation. https://code.google.com/p/chromium/codesearch#chromium/src/pdf/document_loader.cc&sq=package:chromium&type=cs&l=161
4 years, 11 months ago (2016-01-15 22:34:29 UTC) #9
Lei Zhang
https://codereview.chromium.org/1585403004/diff/20001/content/browser/loader/resource_dispatcher_host_impl.cc File content/browser/loader/resource_dispatcher_host_impl.cc (right): https://codereview.chromium.org/1585403004/diff/20001/content/browser/loader/resource_dispatcher_host_impl.cc#newcode832 content/browser/loader/resource_dispatcher_host_impl.cc:832: base::Int64ToString(response->head.content_length)); On 2016/01/15 22:20:59, mmenke wrote: > The PDF ...
4 years, 11 months ago (2016-01-15 23:13:29 UTC) #10
mmenke
On 2016/01/15 23:13:29, Lei Zhang wrote: > https://codereview.chromium.org/1585403004/diff/20001/content/browser/loader/resource_dispatcher_host_impl.cc > File content/browser/loader/resource_dispatcher_host_impl.cc (right): > > https://codereview.chromium.org/1585403004/diff/20001/content/browser/loader/resource_dispatcher_host_impl.cc#newcode832 ...
4 years, 11 months ago (2016-01-15 23:16:52 UTC) #11
Lei Zhang
On 2016/01/15 23:16:52, mmenke wrote: > The issue is that for web requests, the content-length ...
4 years, 11 months ago (2016-01-15 23:20:32 UTC) #12
mmenke
On 2016/01/15 23:20:32, Lei Zhang wrote: > On 2016/01/15 23:16:52, mmenke wrote: > > The ...
4 years, 11 months ago (2016-01-15 23:22:54 UTC) #13
mmenke
On 2016/01/15 23:22:54, mmenke wrote: > On 2016/01/15 23:20:32, Lei Zhang wrote: > > On ...
4 years, 11 months ago (2016-01-15 23:26:18 UTC) #14
mmenke
On 2016/01/15 23:26:18, mmenke wrote: > On 2016/01/15 23:22:54, mmenke wrote: > > On 2016/01/15 ...
4 years, 11 months ago (2016-01-15 23:33:37 UTC) #15
jbreiden
I understand the range request situation very well and can answer any questions about it. ...
4 years, 11 months ago (2016-01-15 23:59:18 UTC) #16
jbreiden
The design intent is: no range requests if PDF is compressed during transport.
4 years, 11 months ago (2016-01-16 00:03:49 UTC) #17
Lei Zhang
On 2016/01/15 23:59:18, jbreiden wrote: > I understand the range request situation very well and ...
4 years, 11 months ago (2016-01-16 00:04:45 UTC) #18
mmenke
On 2016/01/15 23:59:18, jbreiden wrote: > I understand the range request situation very well and ...
4 years, 11 months ago (2016-01-16 00:17:25 UTC) #19
jbreiden
Okay. Spelchat can also answer questions if you desperately need to understand something in the ...
4 years, 11 months ago (2016-01-16 00:22:19 UTC) #20
jbreiden
Everyone is back.
4 years, 10 months ago (2016-02-02 03:21:07 UTC) #21
mmenke
On 2016/02/02 03:21:07, jbreiden wrote: > Everyone is back. I haven't done the digging I ...
4 years, 10 months ago (2016-02-02 16:03:15 UTC) #22
mmenke
Should we pick up this CL again? Does seem like something worth fixing. While the ...
4 years, 7 months ago (2016-05-06 17:11:21 UTC) #23
Lei Zhang
Ya, we should get back to this CL. zork@ should be able to answer some ...
4 years, 7 months ago (2016-05-09 21:49:37 UTC) #24
Zachary Kuznia
On 2016/05/09 21:49:37, Lei Zhang wrote: > Ya, we should get back to this CL. ...
4 years, 7 months ago (2016-05-09 22:23:07 UTC) #25
mmenke
https://codereview.chromium.org/1585403004/diff/20001/content/browser/loader/resource_dispatcher_host_impl.cc File content/browser/loader/resource_dispatcher_host_impl.cc (right): https://codereview.chromium.org/1585403004/diff/20001/content/browser/loader/resource_dispatcher_host_impl.cc#newcode832 content/browser/loader/resource_dispatcher_host_impl.cc:832: base::Int64ToString(response->head.content_length)); On 2016/01/15 23:13:29, Lei Zhang wrote: > On ...
4 years, 7 months ago (2016-05-11 19:31:17 UTC) #26
mmenke
4 years, 7 months ago (2016-05-11 19:34:00 UTC) #27
On 2016/05/09 22:23:07, Zachary Kuznia wrote:
> On 2016/05/09 21:49:37, Lei Zhang wrote:
> > Ya, we should get back to this CL. zork@ should be able to answer some of
> these
> > questions about streams?
> 
> A stream takes a dispatched resource, and provides the data from it to an
> extension.
>
https://code.google.com/p/chromium/codesearch#chromium/src/chrome/common/exte...
> The bogus headers will be passed to the extension, and would probably fill the
> expected_file_size.  It shouldn't affect anything in the extension, though. 
The
> size is a hint, and isn't guaranteed to be correct.

I can't find where we set expectedContentSize, but it really should be set from
URLRequest::GetExpectedContentSize, which is the actual size of the body, if
there's no error, and the server did not lie to us, or -1.  It's -1 whenever any
compression is applied.

Powered by Google App Engine
This is Rietveld 408576698