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

Unified Diff: chrome/browser/media_galleries/media_file_system_registry.cc

Issue 15294020: StorageMonitor: Make StorageInfo a real class. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: address nits Created 7 years, 7 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_galleries/media_file_system_registry.cc
===================================================================
--- chrome/browser/media_galleries/media_file_system_registry.cc (revision 201619)
+++ chrome/browser/media_galleries/media_file_system_registry.cc (working copy)
@@ -474,21 +474,21 @@
return preferences;
std::vector<StorageInfo> existing_devices = monitor->GetAttachedStorage();
for (size_t i = 0; i < existing_devices.size(); i++) {
- if (!StorageInfo::IsMediaDevice(existing_devices[i].device_id))
+ if (!StorageInfo::IsMediaDevice(existing_devices[i].device_id()))
continue;
- if (!existing_devices[i].name.empty()) {
- preferences->AddGalleryWithName(existing_devices[i].device_id,
- existing_devices[i].name,
+ if (!existing_devices[i].name().empty()) {
+ preferences->AddGalleryWithName(existing_devices[i].device_id(),
+ existing_devices[i].name(),
base::FilePath(),
false /*not user added*/);
} else {
- preferences->AddGallery(existing_devices[i].device_id,
+ preferences->AddGallery(existing_devices[i].device_id(),
base::FilePath(),
false,
- existing_devices[i].storage_label,
- existing_devices[i].vendor_name,
- existing_devices[i].model_name,
- existing_devices[i].total_size_in_bytes,
+ existing_devices[i].storage_label(),
+ existing_devices[i].vendor_name(),
+ existing_devices[i].model_name(),
+ existing_devices[i].total_size_in_bytes(),
base::Time::Now());
}
}
@@ -513,7 +513,7 @@
MediaGalleriesPreferences* preferences = GetPreferences(profile_it->first);
InvalidatedGalleriesInfo invalid_galleries_in_profile;
invalid_galleries_in_profile.pref_ids =
- preferences->LookUpGalleriesByDeviceId(info.device_id);
+ preferences->LookUpGalleriesByDeviceId(info.device_id());
for (ExtensionHostMap::const_iterator extension_host_it =
profile_it->second.begin();

Powered by Google App Engine
This is Rietveld 408576698