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

Unified Diff: chrome/browser/system_monitor/media_storage_util.cc

Issue 10911350: Update Windows System Monitor Removable Device Impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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/system_monitor/media_storage_util.cc
diff --git a/chrome/browser/system_monitor/media_storage_util.cc b/chrome/browser/system_monitor/media_storage_util.cc
index c6a03ed6c1b057450d8aa2ff3bc0b9c237412a72..9b705e828302561f3fb09bff6b70a6835b9c612f 100644
--- a/chrome/browser/system_monitor/media_storage_util.cc
+++ b/chrome/browser/system_monitor/media_storage_util.cc
@@ -221,7 +221,8 @@ bool MediaStorageUtil::GetDeviceInfoFromPath(const FilePath& path,
bool found_device = false;
base::SystemMonitor::RemovableStorageInfo device_info;
-#if (defined(OS_LINUX) || defined(OS_MACOSX)) && !defined(OS_CHROMEOS)
+#if (defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)) && \
vandebo (ex-Chrome) 2012/09/18 00:51:43 This is the only part that changed.
+ !defined(OS_CHROMEOS)
RemovableDeviceNotifications* notifier =
RemovableDeviceNotifications::GetInstance();
found_device = notifier->GetDeviceInfoForPath(path, &device_info);
@@ -248,6 +249,12 @@ bool MediaStorageUtil::GetDeviceInfoFromPath(const FilePath& path,
return true;
}
+ // On Posix systems, there's one root so any absolute path could be valid.
+#if !defined(OS_POSIX)
+ if (!found_device)
+ return false;
+#endif
+
if (device_id)
*device_id = MakeDeviceId(FIXED_MASS_STORAGE, path.AsUTF8Unsafe());
if (device_name)
« no previous file with comments | « chrome/browser/chrome_browser_main_win.cc ('k') | chrome/browser/system_monitor/removable_device_notifications_window_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698