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

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

Issue 13524003: [StorageMonitor] Remove GetStorageSize. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Compiling... Created 7 years, 8 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_unittest.cc
diff --git a/chrome/browser/storage_monitor/storage_monitor_linux_unittest.cc b/chrome/browser/storage_monitor/storage_monitor_linux_unittest.cc
index d6793a59dd7ee1f0bae52c22d26e71e1ced6cfe9..0794a86dd9c08faffeabc1420dd93b5f1da005e6 100644
--- a/chrome/browser/storage_monitor/storage_monitor_linux_unittest.cc
+++ b/chrome/browser/storage_monitor/storage_monitor_linux_unittest.cc
@@ -261,6 +261,14 @@ class StorageMonitorLinuxTest : public testing::Test {
return monitor_.get();
}
+ uint64 GetStorageSize(const base::FilePath& path) {
+ StorageInfo info;
+ if (!notifier()->GetStorageInfoForPath(path, &info))
+ return 0;
+
+ return info.total_size_in_bytes;
+ }
+
private:
// Create a directory named |dir| relative to the test directory.
// Set |with_dcim_dir| to true if the created directory will have a "DCIM"
@@ -694,11 +702,11 @@ TEST_F(StorageMonitorLinuxTest, DevicePartitionSize) {
EXPECT_EQ(0, observer().detach_calls());
EXPECT_EQ(GetDevicePartitionSize(kDeviceDCIM1),
- notifier()->GetStorageSize(test_path_a.value()));
+ GetStorageSize(test_path_a));
EXPECT_EQ(GetDevicePartitionSize(kDeviceNoDCIM),
- notifier()->GetStorageSize(test_path_b.value()));
+ GetStorageSize(test_path_b));
EXPECT_EQ(GetDevicePartitionSize(kInvalidPath),
- notifier()->GetStorageSize(kInvalidPath));
+ GetStorageSize(base::FilePath(kInvalidPath)));
}
} // namespace
« no previous file with comments | « chrome/browser/storage_monitor/storage_monitor_linux.cc ('k') | chrome/browser/storage_monitor/storage_monitor_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698