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

Issue 1134393002: Implement ChromeOS mime type extension mappings. (Closed)

Created:
5 years, 7 months ago by yawano
Modified:
5 years, 7 months ago
Reviewers:
eroman
CC:
chromium-reviews, cbentzel+watch_chromium.org, satorux1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement ChromeOS mime type extension mappings. Previously ChromeOS used same implementation with linux which returns mime type by reading mimetype-extension database in the OS. However it doesn't worked since ChromeOS doesn't have it. This CL implements ChromeOS specific logic which returns mime type based on hard-coded list. BUG=472017, 477913, 488378 TEST=net_unittests:MimeUtilTest.ExtensionTest Committed: https://crrev.com/c8297369dc77b7f06027b3ca91bd4c9cc552a3cf Cr-Commit-Position: refs/heads/master@{#330482}

Patch Set 1 #

Patch Set 2 : Move to platform_mime_util_chromeos.cc #

Total comments: 15

Patch Set 3 : Move to mime_extension_chromeos.cc. #

Patch Set 4 : Convert to UTF8. #

Patch Set 5 : Reject an input which contains a null character. #

Patch Set 6 : Move constant definition. #

Patch Set 7 : Fix compile error. #

Patch Set 8 : Add application/zip (required by test). #

Patch Set 9 : Flag guard two test cases for ChromeOS. #

Total comments: 8

Patch Set 10 : Address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+104 lines, -10 lines) Patch
A net/base/mime_extension_chromeos.h View 1 2 3 4 5 6 7 8 9 1 chunk +21 lines, -0 lines 0 comments Download
A net/base/mime_extension_chromeos.cc View 1 2 3 4 5 6 7 8 9 1 chunk +41 lines, -0 lines 0 comments Download
M net/base/mime_util.h View 1 2 3 4 5 6 7 8 9 1 chunk +10 lines, -0 lines 0 comments Download
M net/base/mime_util.cc View 1 2 3 4 5 6 7 8 9 3 chunks +9 lines, -9 lines 0 comments Download
M net/base/mime_util_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +13 lines, -1 line 0 comments Download
M net/base/platform_mime_util_linux.cc View 1 2 2 chunks +8 lines, -0 lines 0 comments Download
M net/net.gypi View 1 2 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (2 generated)
yawano
PTAL. Thank you!
5 years, 7 months ago (2015-05-14 08:34:38 UTC) #2
eroman
We need a better strategy for ChromeOS than simply adding more mappings to the global ...
5 years, 7 months ago (2015-05-14 23:06:19 UTC) #3
yawano
I'll create a patch set to move this mapping to platform_mime_util_chromeos.cc. While platform_mime_util_linux.cc is also ...
5 years, 7 months ago (2015-05-15 05:02:01 UTC) #4
eroman
sounds good.
5 years, 7 months ago (2015-05-15 05:04:21 UTC) #5
yawano
PTAL. Thank you! https://codereview.chromium.org/1134393002/diff/20001/net/base/mime_util.cc File net/base/mime_util.cc (left): https://codereview.chromium.org/1134393002/diff/20001/net/base/mime_util.cc#oldcode219 net/base/mime_util.cc:219: { "application/epub+zip", "epub" }, Since epub ...
5 years, 7 months ago (2015-05-15 08:11:51 UTC) #6
eroman
What is the testing strategy for this changelist? https://codereview.chromium.org/1134393002/diff/20001/net/base/platform_mime_util_chromeos.cc File net/base/platform_mime_util_chromeos.cc (right): https://codereview.chromium.org/1134393002/diff/20001/net/base/platform_mime_util_chromeos.cc#newcode18 net/base/platform_mime_util_chromeos.cc:18: } ...
5 years, 7 months ago (2015-05-15 09:05:33 UTC) #7
yawano
Thank you for the review! Currently we don't have a test code for this CL. ...
5 years, 7 months ago (2015-05-15 09:19:50 UTC) #8
yawano
mime_util has mime_util_unittest.cc. I think this can be covered by the test case (while we ...
5 years, 7 months ago (2015-05-15 10:05:09 UTC) #9
eroman
Adding the test to mime_util_unittest.cc sounds like a good plan. If the mapping is not ...
5 years, 7 months ago (2015-05-18 01:00:08 UTC) #10
yawano
PTAL. Thank you! https://codereview.chromium.org/1134393002/diff/20001/net/base/platform_mime_util_chromeos.cc File net/base/platform_mime_util_chromeos.cc (right): https://codereview.chromium.org/1134393002/diff/20001/net/base/platform_mime_util_chromeos.cc#newcode18 net/base/platform_mime_util_chromeos.cc:18: } On 2015/05/15 09:05:33, eroman (sick ...
5 years, 7 months ago (2015-05-18 08:59:44 UTC) #11
eroman
Please update the changelist descriptive to be be more descriptive than "Add text/calendar mime type.": ...
5 years, 7 months ago (2015-05-18 15:45:24 UTC) #12
yawano
Thank you for the review! PTAL. https://codereview.chromium.org/1134393002/diff/160001/net/base/mime_extension_chromeos.h File net/base/mime_extension_chromeos.h (right): https://codereview.chromium.org/1134393002/diff/160001/net/base/mime_extension_chromeos.h#newcode12 net/base/mime_extension_chromeos.h:12: namespace chromeos { ...
5 years, 7 months ago (2015-05-19 02:26:40 UTC) #13
eroman
lgtm
5 years, 7 months ago (2015-05-19 04:32:23 UTC) #14
yawano
On 2015/05/19 04:32:23, eroman (sick slow) wrote: > lgtm Thank you!
5 years, 7 months ago (2015-05-19 04:58:20 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1134393002/180001
5 years, 7 months ago (2015-05-19 04:58:46 UTC) #17
commit-bot: I haz the power
Committed patchset #10 (id:180001)
5 years, 7 months ago (2015-05-19 05:48:10 UTC) #18
commit-bot: I haz the power
5 years, 7 months ago (2015-05-19 05:49:03 UTC) #19
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/c8297369dc77b7f06027b3ca91bd4c9cc552a3cf
Cr-Commit-Position: refs/heads/master@{#330482}

Powered by Google App Engine
This is Rietveld 408576698