| Index: chrome/browser/extensions/api/system_storage/storage_info_provider.cc
|
| ===================================================================
|
| --- chrome/browser/extensions/api/system_storage/storage_info_provider.cc (revision 218837)
|
| +++ chrome/browser/extensions/api/system_storage/storage_info_provider.cc (working copy)
|
| @@ -25,11 +25,16 @@
|
| StorageUnitInfo* unit) {
|
| unit->id = StorageMonitor::GetInstance()->GetTransientIdForDeviceId(
|
| info.device_id());
|
| - unit->name = UTF16ToUTF8(info.name());
|
| - // TODO(hmin): Might need to take MTP device into consideration.
|
| - unit->type = chrome::StorageInfo::IsRemovableDevice(info.device_id()) ?
|
| - STORAGE_UNIT_TYPE_REMOVABLE : STORAGE_UNIT_TYPE_FIXED;
|
| unit->capacity = static_cast<double>(info.total_size_in_bytes());
|
| +
|
| + if (chrome::StorageInfo::IsRemovableDevice(info.device_id())) {
|
| + // TODO(hmin): Might need to take MTP device into consideration.
|
| + unit->name = base::UTF16ToUTF8(info.GetDisplayName(false));
|
| + unit->type = STORAGE_UNIT_TYPE_REMOVABLE;
|
| + } else {
|
| + unit->name = base::UTF16ToUTF8(info.storage_label());
|
| + unit->type = STORAGE_UNIT_TYPE_FIXED;
|
| + }
|
| }
|
|
|
| } // namespace systeminfo
|
|
|