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

Unified Diff: chrome/browser/storage_monitor/storage_monitor_win.cc

Issue 16186002: Refine StorageMonitor storage device getter (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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/storage_monitor_win.cc
diff --git a/chrome/browser/storage_monitor/storage_monitor_win.cc b/chrome/browser/storage_monitor/storage_monitor_win.cc
index 94a88bdf4110a72a95364bb63e8e4d144ab874eb..778b73f925a4dde24cb483b642ceb3a3c63d42b9 100644
--- a/chrome/browser/storage_monitor/storage_monitor_win.cc
+++ b/chrome/browser/storage_monitor/storage_monitor_win.cc
@@ -81,7 +81,7 @@ bool StorageMonitorWin::GetStorageInfoForPath(const base::FilePath& path,
// TODO(gbillock): Move this logic up to StorageMonitor.
// If we already know the StorageInfo for the path, just return it.
// This will account for portable devices as well.
- std::vector<StorageInfo> attached_devices = GetAttachedStorage();
+ std::vector<StorageInfo> attached_devices = GetAttachedRemovableStorages();
size_t best_parent = attached_devices.size();
size_t best_length = 0;
for (size_t i = 0; i < attached_devices.size(); i++) {
@@ -134,6 +134,13 @@ bool StorageMonitorWin::GetMTPStorageInfoFromDeviceId(
storage_device_id, device_location, storage_object_id));
}
+std::vector<StorageInfo> StorageMonitorWin::GetAllAvailableStorages() const {
+ std::vector<StorageInfo> results;
+ if (volume_mount_watcher_.get())
+ results = volume_mount_watcher_->GetAllVolumeStorages();
+ return results;
+}
+
// static
LRESULT CALLBACK StorageMonitorWin::WndProcThunk(HWND hwnd, UINT message,
WPARAM wparam, LPARAM lparam) {

Powered by Google App Engine
This is Rietveld 408576698