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

Unified Diff: chrome/browser/media_gallery/media_storage_util.cc

Issue 10873072: Rename SystemMonitor's MediaDevice calls to RemovableStorage. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/media_gallery/media_file_system_registry.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media_gallery/media_storage_util.cc
===================================================================
--- chrome/browser/media_gallery/media_storage_util.cc (revision 153336)
+++ chrome/browser/media_gallery/media_storage_util.cc (working copy)
@@ -21,7 +21,7 @@
namespace {
-typedef std::vector<SystemMonitor::MediaDeviceInfo> MediaDevicesInfo;
+typedef std::vector<SystemMonitor::RemovableStorageInfo> RemovableStorageInfo;
// Prefix constants for different device id spaces.
const char kUsbMassStorageWithDCIMPrefix[] = "dcim:";
@@ -44,13 +44,14 @@
base::Bind(callback, path));
}
-FilePath::StringType FindMediaDeviceLocationById(const std::string& device_id) {
- MediaDevicesInfo media_devices =
- SystemMonitor::Get()->GetAttachedMediaDevices();
- for (MediaDevicesInfo::const_iterator it = media_devices.begin();
+FilePath::StringType FindRemovableStorageLocationById(
+ const std::string& device_id) {
+ RemovableStorageInfo media_devices =
+ SystemMonitor::Get()->GetAttachedRemovableStorage();
+ for (RemovableStorageInfo::const_iterator it = media_devices.begin();
it != media_devices.end();
++it) {
- if (it->unique_id == device_id)
+ if (it->device_id == device_id)
return it->location;
}
return FilePath::StringType();
@@ -151,7 +152,7 @@
case USB_MTP: // Fall through
case USB_MASS_STORAGE_WITH_DCIM:
// We should be able to find media devices in SystemMonitor.
- callback.Run(!FindMediaDeviceLocationById(device_id).empty());
+ callback.Run(!FindRemovableStorageLocationById(device_id).empty());
break;
case USB_MASS_STORAGE_NO_DCIM:
FindUSBDeviceById(unique_id,
@@ -210,7 +211,7 @@
FilePath::FromUTF8Unsafe(unique_id), callback));
break;
case USB_MASS_STORAGE_WITH_DCIM:
- callback.Run(FilePath(FindMediaDeviceLocationById(device_id)));
+ callback.Run(FilePath(FindRemovableStorageLocationById(device_id)));
break;
}
NOTREACHED();
« no previous file with comments | « chrome/browser/media_gallery/media_file_system_registry.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698