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

Issue 1073003003: Do not handle a file as application/zip when the extension is not .zip. (Closed)

Created:
5 years, 8 months ago by yawano
Modified:
5 years, 8 months ago
Reviewers:
benwells
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org, kinaba
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Do not handle a file as application/zip when the extension is not .zip. BUG=473604 TEST=manually tested Committed: https://crrev.com/5fb4a1e8460df4c87aca8478f5606f6975536545 Cr-Commit-Position: refs/heads/master@{#325215}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Move to OnSniffMimeTypeForNativeLocalPathCompleted. #

Total comments: 2

Patch Set 3 : Change default to application/octet-stream. #

Patch Set 4 : Add kMimeTypeApplicationOctetStream. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -1 line) Patch
M chrome/browser/extensions/api/file_handlers/mime_util.cc View 1 2 3 3 chunks +17 lines, -1 line 0 comments Download

Messages

Total messages: 13 (2 generated)
yawano
PTAL. Thank you!
5 years, 8 months ago (2015-04-13 08:32:02 UTC) #2
benwells
https://codereview.chromium.org/1073003003/diff/1/chrome/browser/extensions/api/file_handlers/mime_util.cc File chrome/browser/extensions/api/file_handlers/mime_util.cc (right): https://codereview.chromium.org/1073003003/diff/1/chrome/browser/extensions/api/file_handlers/mime_util.cc#newcode44 chrome/browser/extensions/api/file_handlers/mime_util.cc:44: local_path.Extension() != FILE_PATH_LITERAL(".zip")) The logic of this flow is, ...
5 years, 8 months ago (2015-04-14 21:57:22 UTC) #3
yawano
Thank you for the review! PTAL. https://codereview.chromium.org/1073003003/diff/1/chrome/browser/extensions/api/file_handlers/mime_util.cc File chrome/browser/extensions/api/file_handlers/mime_util.cc (right): https://codereview.chromium.org/1073003003/diff/1/chrome/browser/extensions/api/file_handlers/mime_util.cc#newcode44 chrome/browser/extensions/api/file_handlers/mime_util.cc:44: local_path.Extension() != FILE_PATH_LITERAL(".zip")) ...
5 years, 8 months ago (2015-04-15 03:41:34 UTC) #4
benwells
https://codereview.chromium.org/1073003003/diff/20001/chrome/browser/extensions/api/file_handlers/mime_util.cc File chrome/browser/extensions/api/file_handlers/mime_util.cc (right): https://codereview.chromium.org/1073003003/diff/20001/chrome/browser/extensions/api/file_handlers/mime_util.cc#newcode111 chrome/browser/extensions/api/file_handlers/mime_util.cc:111: scoped_ptr<std::string> sniffed_mime_type(new std::string); Can we initialize this to "application/octet-stream" ...
5 years, 8 months ago (2015-04-15 05:01:17 UTC) #5
yawano
PTAL. Thank you! https://codereview.chromium.org/1073003003/diff/20001/chrome/browser/extensions/api/file_handlers/mime_util.cc File chrome/browser/extensions/api/file_handlers/mime_util.cc (right): https://codereview.chromium.org/1073003003/diff/20001/chrome/browser/extensions/api/file_handlers/mime_util.cc#newcode111 chrome/browser/extensions/api/file_handlers/mime_util.cc:111: scoped_ptr<std::string> sniffed_mime_type(new std::string); On 2015/04/15 05:01:17, ...
5 years, 8 months ago (2015-04-15 06:34:02 UTC) #6
benwells
lgtm
5 years, 8 months ago (2015-04-15 07:01:12 UTC) #7
benwells
lgtm lgtm
5 years, 8 months ago (2015-04-15 07:01:13 UTC) #8
yawano
On 2015/04/15 07:01:13, benwells wrote: > lgtm > > lgtm Thank you!
5 years, 8 months ago (2015-04-15 07:02:39 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1073003003/60001
5 years, 8 months ago (2015-04-15 07:03:11 UTC) #11
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 8 months ago (2015-04-15 09:59:15 UTC) #12
commit-bot: I haz the power
5 years, 8 months ago (2015-04-15 09:59:58 UTC) #13
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/5fb4a1e8460df4c87aca8478f5606f6975536545
Cr-Commit-Position: refs/heads/master@{#325215}

Powered by Google App Engine
This is Rietveld 408576698