Chromium Code Reviews| Index: chrome/browser/chromeos/file_manager/filesystem_api_util.cc |
| diff --git a/chrome/browser/chromeos/file_manager/filesystem_api_util.cc b/chrome/browser/chromeos/file_manager/filesystem_api_util.cc |
| index c19fb7ecb9a740c233ee6cae328a83861e2384f0..b2ed5c25589dd88fb13629cd130905b1760e4685 100644 |
| --- a/chrome/browser/chromeos/file_manager/filesystem_api_util.cc |
| +++ b/chrome/browser/chromeos/file_manager/filesystem_api_util.cc |
| @@ -35,7 +35,8 @@ void GetMimeTypeAfterGetResourceEntryForDrive( |
| scoped_ptr<drive::ResourceEntry> entry) { |
| DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| - if (error != drive::FILE_ERROR_OK || !entry->has_file_specific_info()) { |
| + if (error != drive::FILE_ERROR_OK || !entry->has_file_specific_info() || |
| + entry->file_specific_info().content_mime_type().empty()) { |
|
mtomasz
2014/09/25 06:48:09
Could you please extract it into a separate CL? Th
hirono
2014/09/25 07:38:07
I got it. Let me separate.
|
| callback.Run(false, std::string()); |
| return; |
| } |
| @@ -50,7 +51,7 @@ void GetMimeTypeAfterGetMetadataForProvidedFileSystem( |
| base::File::Error result) { |
| DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| - if (result != base::File::FILE_OK) { |
| + if (result != base::File::FILE_OK || metadata->mime_type.empty()) { |
| callback.Run(false, std::string()); |
| return; |
| } |
| @@ -177,11 +178,11 @@ void GetNonNativeLocalPathMimeType( |
| return; |
| } |
| - // As a fallback just return success with an empty mime type value. |
| + // As a fallback just return failure with an empty mime type value. |
|
mtomasz
2014/09/25 06:48:09
nit: The comment doesn't make much sense anymore.
hirono
2014/09/25 07:38:07
Let me handle this in the extracted patch.
|
| content::BrowserThread::PostTask( |
| content::BrowserThread::UI, |
| FROM_HERE, |
| - base::Bind(callback, true /* success */, std::string())); |
| + base::Bind(callback, false /* failure */, std::string())); |
| } |
| void IsNonNativeLocalPathDirectory( |