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

Unified Diff: chrome/browser/storage_monitor/media_storage_util.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/storage_monitor/media_storage_util.cc
===================================================================
--- chrome/browser/storage_monitor/media_storage_util.cc (revision 201619)
+++ chrome/browser/storage_monitor/media_storage_util.cc (working copy)
@@ -53,7 +53,7 @@
StorageInfoList devices = StorageMonitor::GetInstance()->GetAttachedStorage();
for (StorageInfoList::const_iterator it = devices.begin();
it != devices.end(); ++it) {
- if (it->device_id == id)
+ if (it->device_id() == id)
return true;
}
return false;
@@ -64,8 +64,8 @@
StorageInfoList devices = StorageMonitor::GetInstance()->GetAttachedStorage();
for (StorageInfoList::const_iterator it = devices.begin();
it != devices.end(); ++it) {
- if (it->device_id == device_id)
- return it->location;
+ if (it->device_id() == device_id)
+ return it->location();
}
return base::FilePath::StringType();
}
@@ -162,9 +162,9 @@
StorageMonitor* monitor = StorageMonitor::GetInstance();
bool found_device = monitor->GetStorageInfoForPath(path, &info);
- if (found_device && StorageInfo::IsRemovableDevice(info.device_id)) {
+ if (found_device && StorageInfo::IsRemovableDevice(info.device_id())) {
base::FilePath sub_folder_path;
- base::FilePath device_path(info.location);
+ base::FilePath device_path(info.location());
if (path != device_path) {
bool success = device_path.AppendRelativePath(path, &sub_folder_path);
DCHECK(success);
@@ -190,8 +190,9 @@
// good values from StorageMonitor.
// TODO(gbillock): Make sure return values from that class are definitive,
// and don't do this here.
- info.device_id = StorageInfo::MakeDeviceId(StorageInfo::FIXED_MASS_STORAGE,
- path.AsUTF8Unsafe());
+ info.set_device_id(
+ StorageInfo::MakeDeviceId(StorageInfo::FIXED_MASS_STORAGE,
+ path.AsUTF8Unsafe()));
*device_info = info;
*relative_path = base::FilePath();
return true;

Powered by Google App Engine
This is Rietveld 408576698