Index: chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc |
diff --git a/chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc b/chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc |
index 53537d7b5b2243ff20863662aa45d47d8f0591c0..03fff0b29a9ae134ade16755131afddfdcc4e823 100644 |
--- a/chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc |
+++ b/chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc |
@@ -79,7 +79,10 @@ bool StorageInfoProviderMac::QueryUnitInfo(const std::string& id, |
type = dev_path_to_type_map_[volume_dev].empty() ? |
systeminfo::kStorageTypeUnknown : dev_path_to_type_map_[volume_dev]; |
} |
- info->type = type; |
+ if (!api::experimental_system_info_storage:: |
+ GetEnumFromString(type, &info->type)) { |
+ return false; |
+ } |
// TODO(joshuagl): we're reporting different values than Disk Utility. |
// Is there an alternative API to get this information that doesn't use |
// statfs? NSFileManager's attributesOfFileSystemForPath uses statfs. |