| Index: chrome/browser/extensions/api/file_handlers/mime_util.cc
|
| diff --git a/chrome/browser/extensions/api/file_handlers/mime_util.cc b/chrome/browser/extensions/api/file_handlers/mime_util.cc
|
| index 74b622c26bdf7ec03b792d0d409553995be20d29..525df80241a24fd197895045f9db7671dbee44e8 100644
|
| --- a/chrome/browser/extensions/api/file_handlers/mime_util.cc
|
| +++ b/chrome/browser/extensions/api/file_handlers/mime_util.cc
|
| @@ -82,6 +82,15 @@ void OnGetMimeTypeFromMetadataForNonNativeLocalPathCompleted(
|
| void OnSniffMimeTypeForNativeLocalPathCompleted(
|
| scoped_ptr<std::string> mime_type,
|
| const base::Callback<void(const std::string&)>& callback) {
|
| + // Do not return application/zip as sniffed result. If the file has .zip
|
| + // extension, it should be already returned as application/zip. If the file
|
| + // does not have .zip extension and couldn't find mime type from the
|
| + // extension, it might be unknown internally zipped file.
|
| + if (*mime_type == "application/zip") {
|
| + callback.Run("application/octet-stream");
|
| + return;
|
| + }
|
| +
|
| callback.Run(*mime_type);
|
| }
|
|
|
|
|