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

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

Issue 15988011: Refine StorageMonitor storage device getter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix SystemInfoStorageApiTest failures in browser_tests Created 7 years, 6 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 748834e118dd3a4dbdd71a5f7eee7538107e2859..4fcc8f6b2856f377ee57f7c3c533f1c08fb14c9e 100644
--- a/chrome/browser/storage_monitor/storage_monitor_win.cc
+++ b/chrome/browser/storage_monitor/storage_monitor_win.cc
@@ -74,10 +74,12 @@ 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 = GetAllAvailableStorages();
size_t best_parent = attached_devices.size();
size_t best_length = 0;
for (size_t i = 0; i < attached_devices.size(); i++) {
+ if (!StorageInfo::IsRemovableDevice(attached_devices[i].device_id()))
+ continue;
base::FilePath relative;
if (base::FilePath(attached_devices[i].location()).AppendRelativePath(
path, &relative)) {

Powered by Google App Engine
This is Rietveld 408576698