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

Issue 62111: Give the filter setup more context so it can figure out whether it's download... (Closed)

Created:
11 years, 8 months ago by Lei Zhang
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Give the filter setup more context so it can figure out whether it's downloading a file or not. Only refuse to gunzip svgz files on download, so we can send an uncompressed svgz file to webkit. BUG=9737 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=13536

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 9

Patch Set 3 : '' #

Patch Set 4 : '' #

Total comments: 6

Patch Set 5 : '' #

Total comments: 8

Patch Set 6 : '' #

Total comments: 2

Patch Set 7 : '' #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+90 lines, -9 lines) Patch
M chrome/browser/renderer_host/resource_dispatcher_host.cc View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M net/base/filter.h View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M net/base/filter.cc View 1 2 3 4 5 6 1 chunk +6 lines, -1 line 0 comments Download
M net/base/filter_unittest.h View 2 3 4 5 6 4 chunks +6 lines, -0 lines 0 comments Download
M net/base/filter_unittest.cc View 2 3 4 5 6 8 chunks +56 lines, -8 lines 0 comments Download
M net/base/load_flags.h View 2 3 4 5 6 2 chunks +5 lines, -0 lines 0 comments Download
M net/url_request/url_request_job.h View 1 2 3 4 5 6 2 chunks +6 lines, -0 lines 3 comments Download
M net/url_request/url_request_job.cc View 1 2 3 4 5 6 3 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
Lei Zhang
eseidel: Do you have any thoughts on svgz handling? hclam: Am I using net::LOAD_ENABLE_DOWNLOAD_FILE appropriately? ...
11 years, 8 months ago (2009-04-07 19:12:10 UTC) #1
Alpha Left Google
> hclam: Am I using net::LOAD_ENABLE_DOWNLOAD_FILE appropriately? LOAD_ENABLE_DOWNLOAD_FILE is actually a bad name for what ...
11 years, 8 months ago (2009-04-07 20:08:15 UTC) #2
Lei Zhang
On 2009/04/07 20:08:15, Alpha wrote: > > hclam: Am I using net::LOAD_ENABLE_DOWNLOAD_FILE appropriately? > > ...
11 years, 8 months ago (2009-04-07 22:16:06 UTC) #3
Lei Zhang
+jar who wrote a lot of the filter code.
11 years, 8 months ago (2009-04-07 22:19:50 UTC) #4
jar (doing other things)
I wanted wtc to confirm that we're grabbing the load_flags() from request_ at the right ...
11 years, 8 months ago (2009-04-07 23:54:21 UTC) #5
Lei Zhang
http://codereview.chromium.org/62111/diff/8/1014 File net/base/filter_unittest.cc (right): http://codereview.chromium.org/62111/diff/8/1014#newcode202 Line 202: EXPECT_FALSE(encoding_types.empty()); On 2009/04/07 23:54:21, jar wrote: > Please ...
11 years, 8 months ago (2009-04-08 00:28:33 UTC) #6
Lei Zhang
Whoops, I got load state and load flags confused. I changed UrlRequestJob to grab the ...
11 years, 8 months ago (2009-04-08 19:42:24 UTC) #7
jar (doing other things)
I sent some email... but here are a few specific comments on the CL. Thanks, ...
11 years, 8 months ago (2009-04-09 01:05:40 UTC) #8
Lei Zhang
http://codereview.chromium.org/62111/diff/1027/24 File chrome/browser/renderer_host/resource_dispatcher_host.cc (right): http://codereview.chromium.org/62111/diff/1027/24#newcode528 Line 528: request->set_load_flags(request->load_flags() | net::LOAD_BY_DOWNLOAD_MANAGER); On 2009/04/09 01:05:40, jar wrote: ...
11 years, 8 months ago (2009-04-09 18:04:24 UTC) #9
wtc
This CL gives me the impression that it is a hacky solution. It fixes the ...
11 years, 8 months ago (2009-04-09 23:19:23 UTC) #10
wtc
Lei, Just to clarify what I asked you to change: 1. Please rename the new ...
11 years, 8 months ago (2009-04-09 23:53:29 UTC) #11
Lei Zhang
http://codereview.chromium.org/62111/diff/29/33 File net/base/filter.cc (right): http://codereview.chromium.org/62111/diff/29/33#newcode111 Line 111: filter_context.IsDownload()) { On 2009/04/09 23:19:24, wtc wrote: > ...
11 years, 8 months ago (2009-04-10 00:57:13 UTC) #12
Alpha Left Google
Sorry for the delay, I just did more studies about this bug. First of all ...
11 years, 8 months ago (2009-04-10 01:01:27 UTC) #13
wtc
LGTM. Thanks. Please fix the two nits below. Here are my thoughts on this CL ...
11 years, 8 months ago (2009-04-10 18:05:41 UTC) #14
Lei Zhang
On 2009/04/10 18:05:41, wtc wrote: > To make this work, we may need to move ...
11 years, 8 months ago (2009-04-10 19:28:09 UTC) #15
jar (doing other things)
http://codereview.chromium.org/62111/diff/6012/5015 File net/url_request/url_request_job.h (right): http://codereview.chromium.org/62111/diff/6012/5015#newcode127 Line 127: virtual bool IsSdchResponse() const { return false; } ...
11 years, 8 months ago (2009-04-10 20:27:14 UTC) #16
Lei Zhang
http://codereview.chromium.org/62111/diff/6012/5015 File net/url_request/url_request_job.h (right): http://codereview.chromium.org/62111/diff/6012/5015#newcode127 Line 127: virtual bool IsSdchResponse() const { return false; } ...
11 years, 8 months ago (2009-04-10 21:25:21 UTC) #17
jar (doing other things)
11 years, 8 months ago (2009-04-10 22:10:09 UTC) #18
http://codereview.chromium.org/62111/diff/6012/5015
File net/url_request/url_request_job.h (right):

http://codereview.chromium.org/62111/diff/6012/5015#newcode127
Line 127: virtual bool IsSdchResponse() const { return false; }
SDCH is currently outlawed by the spec for simplicity/security reasons in other
schemes (like ftp and https).  Conceptually, it could appear anywhere (i.e. The
general implementation could have been pushed to the base class... and it would
have returned false based on the flags exactly as your accessor gets a bool).

Note that in both cases, the only current consumer of these accessors are in
filter.cc, and hence it is only "really used"  (read: needs to be implemented)
in the derived class.

It is also interesting that the IsSdchResponse() could plausibly be renamed to
IsSdchRequest() (it really flags the fact that the request was a full sdch
request with an applicable dictionary), and IsDownload() might plausibly be
renamed IsDownloadRequest(), making them more clearly similar.

As a result, I go back and forth about where it is best to define these... but 
I suspect they should be defined next to each other, as they both derive from
LOAD_ flags. 


On 2009/04/10 21:25:21, Lei Zhang wrote:
> SDCH only makes sense for http right? To me, download is more general and
> happens for many different types of requests.

Powered by Google App Engine
This is Rietveld 408576698