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

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

Issue 15896007: [SystemInfo API] Rewrite storage info provider using storage monitor impl (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix comments from thestig 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_linux.cc
diff --git a/chrome/browser/storage_monitor/storage_monitor_linux.cc b/chrome/browser/storage_monitor/storage_monitor_linux.cc
index 50848c20218b437d92b2e63c53d53d86b586381f..3d134fb3b9a345bed5bed25069c68d54187258b5 100644
--- a/chrome/browser/storage_monitor/storage_monitor_linux.cc
+++ b/chrome/browser/storage_monitor/storage_monitor_linux.cc
@@ -8,6 +8,7 @@
#include <mntent.h>
#include <stdio.h>
+#include <sys/vfs.h>
#include <list>
@@ -293,6 +294,17 @@ void StorageMonitorLinux::Init() {
new MediaTransferProtocolDeviceObserverLinux(receiver()));
}
+std::vector<StorageInfo> StorageMonitorLinux::GetAllAvailableStorages() const {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ std::vector<StorageInfo> results;
+
+ for (MountMap::const_iterator it = mount_info_map_.begin();
+ it != mount_info_map_.end(); ++it)
+ results.push_back(it->second.storage_info);
+
+ return results;
+}
+
bool StorageMonitorLinux::GetStorageInfoForPath(
const base::FilePath& path,
StorageInfo* device_info) const {

Powered by Google App Engine
This is Rietveld 408576698