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

Unified Diff: net/disk_cache/cache_util_posix.cc

Issue 3141: Move GetFreeDiskSpace to SysInfo. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 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
« no previous file with comments | « net/disk_cache/cache_util.h ('k') | net/disk_cache/cache_util_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/cache_util_posix.cc
===================================================================
--- net/disk_cache/cache_util_posix.cc (revision 2357)
+++ net/disk_cache/cache_util_posix.cc (working copy)
@@ -4,29 +4,12 @@
#include "net/disk_cache/cache_util.h"
-#include <errno.h>
-#include <sys/statvfs.h>
-#include <unistd.h>
-
#include "base/file_util.h"
#include "base/logging.h"
#include "base/string_util.h"
-#if defined(OS_MACOSX)
-#include <mach/mach_host.h>
-#include <mach/mach_init.h>
-#endif
-
namespace disk_cache {
-int64 GetFreeDiskSpace(const std::wstring& path) {
- struct statvfs stats;
- if (statvfs(WideToUTF8(path).c_str(), &stats) != 0) {
- return -1;
- }
- return static_cast<int64>(stats.f_bavail) * stats.f_frsize;
-}
-
bool MoveCache(const std::wstring& from_path, const std::wstring& to_path) {
// Just use the version from base.
return file_util::Move(from_path.c_str(), to_path.c_str());
« no previous file with comments | « net/disk_cache/cache_util.h ('k') | net/disk_cache/cache_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698