summaryrefslogtreecommitdiff
path: root/chromium/base/files/file_util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/base/files/file_util.cc')
-rw-r--r--chromium/base/files/file_util.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/chromium/base/files/file_util.cc b/chromium/base/files/file_util.cc
index 546934b7084..27a2e428d54 100644
--- a/chromium/base/files/file_util.cc
+++ b/chromium/base/files/file_util.cc
@@ -27,6 +27,22 @@
namespace base {
#if !defined(OS_NACL_NONSFI)
+namespace {
+
+void DeleteFileHelper(const FilePath& path) {
+ DeleteFile(path, /*recursive=*/false);
+}
+
+} // namespace
+
+OnceCallback<void(const FilePath&)> GetDeleteFileCallback() {
+ return BindOnce(&DeleteFileHelper);
+}
+
+OnceCallback<void(const FilePath&)> GetDeletePathRecursivelyCallback() {
+ return BindOnce(IgnoreResult(&DeleteFileRecursively));
+}
+
int64_t ComputeDirectorySize(const FilePath& root_path) {
int64_t running_size = 0;
FileEnumerator file_iter(root_path, true, FileEnumerator::FILES);