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

Issue 18364005: Don't override application/octet-stream MIME type. (Closed)

Created:
7 years, 5 months ago by asanka
Modified:
7 years, 5 months ago
CC:
chromium-reviews, benjhayden+dwatch_chromium.org, asanka, darin-cc_chromium.org, joi+watch-content_chromium.org
Visibility:
Public.

Description

Don't override application/octet-stream MIME type. When enumerating candidate plug-ins for handling a document, PluginList::GetPluginInfoArray() attemps to match the MIME type of the document, and then matches the file type based on the URL. Matching by file type is done if the MIME type of the document is either empty or if is application/octet-stream. This change disallows plugin matching based on file type if the MIME type is application/octet-stream. This will, for example, prevent http://example.com/foo.pdf from being associated with the PDF plug-in if it is served with a MIME type of application/octet-stream. As a side-effect, this brings the BufferedResourceHandler's decision of whether a resource should be rendered or downloaded closer in line with Blink's. BUG=104331 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=213119

Patch Set 1 : #

Patch Set 2 : Merge with r212359 #

Total comments: 2

Patch Set 3 : Address comment. #

Patch Set 4 : Merge with r212605 to catch up with file move. #

Patch Set 5 : Merge with r212882 to catch up with namespace changes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+87 lines, -25 lines) Patch
M content/browser/download/download_browsertest.cc View 1 2 3 4 2 chunks +25 lines, -0 lines 0 comments Download
M content/common/plugin_list.cc View 1 2 3 4 2 chunks +7 lines, -26 lines 0 comments Download
M content/common/plugin_list_unittest.cc View 1 2 3 4 4 chunks +55 lines, -0 lines 0 comments Download
A content/test/data/download/octet-stream.abc View 1 chunk +1 line, -0 lines 0 comments Download
A + content/test/data/download/octet-stream.abc.mock-http-headers View 0 chunks +-1 lines, --1 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
asanka
Chris: This follows from an older conversation regarding the issue of handling PDFs served as ...
7 years, 5 months ago (2013-07-18 15:52:03 UTC) #1
Bernhard Bauer
https://codereview.chromium.org/18364005/diff/27001/webkit/plugins/npapi/plugin_list_unittest.cc File webkit/plugins/npapi/plugin_list_unittest.cc (right): https://codereview.chromium.org/18364005/diff/27001/webkit/plugins/npapi/plugin_list_unittest.cc#newcode62 webkit/plugins/npapi/plugin_list_unittest.cc:62: WebPluginMimeType(kFooMimeType, kFooFileType, "")); Nit: Using an empty constructor is ...
7 years, 5 months ago (2013-07-18 21:17:09 UTC) #2
Bernhard Bauer
Sorry, meant to LGTM.
7 years, 5 months ago (2013-07-18 21:17:27 UTC) #3
asanka
Thanks! https://codereview.chromium.org/18364005/diff/27001/webkit/plugins/npapi/plugin_list_unittest.cc File webkit/plugins/npapi/plugin_list_unittest.cc (right): https://codereview.chromium.org/18364005/diff/27001/webkit/plugins/npapi/plugin_list_unittest.cc#newcode62 webkit/plugins/npapi/plugin_list_unittest.cc:62: WebPluginMimeType(kFooMimeType, kFooFileType, "")); On 2013/07/18 21:17:10, Bernhard Bauer ...
7 years, 5 months ago (2013-07-18 21:23:52 UTC) #4
asanka
Ben: Could you take a look at /download/ ?
7 years, 5 months ago (2013-07-18 21:24:51 UTC) #5
benjhayden
lgtm
7 years, 5 months ago (2013-07-19 17:51:11 UTC) #6
asanka
+jam for behavior change and new OWNERS since plugin_list moved to content/common.
7 years, 5 months ago (2013-07-19 19:08:51 UTC) #7
jam
On 2013/07/19 19:08:51, asanka wrote: > +jam for behavior change and new OWNERS since plugin_list ...
7 years, 5 months ago (2013-07-19 20:45:55 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/asanka@chromium.org/18364005/49006
7 years, 5 months ago (2013-07-22 21:16:16 UTC) #9
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) sync_integration_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&number=150597
7 years, 5 months ago (2013-07-22 22:31:54 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/asanka@chromium.org/18364005/49006
7 years, 5 months ago (2013-07-23 14:57:04 UTC) #11
commit-bot: I haz the power
7 years, 5 months ago (2013-07-23 15:16:27 UTC) #12
Message was sent while issue was closed.
Change committed as 213119

Powered by Google App Engine
This is Rietveld 408576698