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

Unified Diff: chrome/browser/media_gallery/media_file_system_registry.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
Index: chrome/browser/media_gallery/media_file_system_registry.cc
===================================================================
--- chrome/browser/media_gallery/media_file_system_registry.cc (revision 153336)
+++ chrome/browser/media_gallery/media_file_system_registry.cc (working copy)
@@ -89,15 +89,15 @@
// TODO(thestig) Handle overlap between devices and media directories.
SystemMonitor* monitor = SystemMonitor::Get();
- const std::vector<SystemMonitor::MediaDeviceInfo> media_devices =
- monitor->GetAttachedMediaDevices();
+ const std::vector<SystemMonitor::RemovableStorageInfo> media_devices =
+ monitor->GetAttachedRemovableStorage();
for (size_t i = 0; i < media_devices.size(); ++i) {
MediaStorageUtil::Type type;
- MediaStorageUtil::CrackDeviceId(media_devices[i].unique_id, &type, NULL);
+ MediaStorageUtil::CrackDeviceId(media_devices[i].device_id, &type, NULL);
// TODO(vandebo) Handle MTP devices.
if (type != MediaStorageUtil::USB_MTP &&
IsGalleryPermittedForExtension(extension, media_devices[i].location)) {
- device_id_map_.insert(std::make_pair(media_devices[i].unique_id,
+ device_id_map_.insert(std::make_pair(media_devices[i].device_id,
media_devices[i]));
FilePath path(media_devices[i].location);
const std::string fsid = RegisterPathAsFileSystem(path);
@@ -119,7 +119,8 @@
return results;
}
-void MediaFileSystemRegistry::OnMediaDeviceDetached(const std::string& id) {
+void MediaFileSystemRegistry::OnRemovableStorageDetached(
+ const std::string& id) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DeviceIdToInfoMap::iterator it = device_id_map_.find(id);
« no previous file with comments | « chrome/browser/media_gallery/media_file_system_registry.h ('k') | chrome/browser/media_gallery/media_storage_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698