summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/cache_util_posix.cc
diff options
context:
space:
mode:
authordeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-18 12:34:24 +0000
committerdeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-18 12:34:24 +0000
commit0e91dd2a1cec40c6fa0390c890e10dc75398de34 (patch)
treef4385248c0abb048ec718cb555b5287847bc4429 /net/disk_cache/cache_util_posix.cc
parentfadf97f2f16f6b3ad2756cd07657c4f47172da92 (diff)
downloadchromium_src-0e91dd2a1cec40c6fa0390c890e10dc75398de34.zip
chromium_src-0e91dd2a1cec40c6fa0390c890e10dc75398de34.tar.gz
chromium_src-0e91dd2a1cec40c6fa0390c890e10dc75398de34.tar.bz2
Move GetFreeDiskSpace to SysInfo.
Patch from Pawel Hajdan Jr. Review URL: http://codereview.chromium.org/3141 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2359 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/cache_util_posix.cc')
-rw-r--r--net/disk_cache/cache_util_posix.cc17
1 files changed, 0 insertions, 17 deletions
diff --git a/net/disk_cache/cache_util_posix.cc b/net/disk_cache/cache_util_posix.cc
index 6928187..80134b4 100644
--- a/net/disk_cache/cache_util_posix.cc
+++ b/net/disk_cache/cache_util_posix.cc
@@ -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());