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

Unified Diff: base/sys_info_posix.cc

Issue 276012: Convert SysInfo::AmountOfFreeDiskSpace from wstring to FilePath. (Closed)
Patch Set: compile Created 11 years, 2 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
« no previous file with comments | « base/sys_info.h ('k') | base/sys_info_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/sys_info_posix.cc
diff --git a/base/sys_info_posix.cc b/base/sys_info_posix.cc
index 74a10ac8d2c13058b21bd880e6583ac565a72aa2..41afff2089e2b6385f6a292c5b09947a3df331e7 100644
--- a/base/sys_info_posix.cc
+++ b/base/sys_info_posix.cc
@@ -86,9 +86,9 @@ int64 SysInfo::AmountOfPhysicalMemory() {
}
// static
-int64 SysInfo::AmountOfFreeDiskSpace(const std::wstring& path) {
+int64 SysInfo::AmountOfFreeDiskSpace(const FilePath& path) {
struct statvfs stats;
- if (statvfs(WideToUTF8(path).c_str(), &stats) != 0) {
+ if (statvfs(path.value().c_str(), &stats) != 0) {
return -1;
}
return static_cast<int64>(stats.f_bavail) * stats.f_frsize;
« no previous file with comments | « base/sys_info.h ('k') | base/sys_info_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698