summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi/file_system_file_util.h
diff options
context:
space:
mode:
authordmikurube@google.com <dmikurube@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-08 23:52:21 +0000
committerdmikurube@google.com <dmikurube@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-08 23:52:21 +0000
commit0e02bfb77e1c726c9ab94b3eddc390baff45ed29 (patch)
tree47e4eb5c48c8d58cbfd92fdc78df837d01b7d439 /webkit/fileapi/file_system_file_util.h
parentbf144dca2ce7f7f8da2aec0f7e5e9ac0de405de3 (diff)
downloadchromium_src-0e02bfb77e1c726c9ab94b3eddc390baff45ed29.zip
chromium_src-0e02bfb77e1c726c9ab94b3eddc390baff45ed29.tar.gz
chromium_src-0e02bfb77e1c726c9ab94b3eddc390baff45ed29.tar.bz2
Virtualize file_util calls from FileSystemFileUtil::PerformCommonCheckAndPreparationForMoveAndCopy.
It refactors the TODO issue at http://codereview.chromium.org/6604020/ . BUG=74841 TEST=none Review URL: http://codereview.chromium.org/6625031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77375 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/fileapi/file_system_file_util.h')
-rw-r--r--webkit/fileapi/file_system_file_util.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/webkit/fileapi/file_system_file_util.h b/webkit/fileapi/file_system_file_util.h
index 9b02a44..996c9f78 100644
--- a/webkit/fileapi/file_system_file_util.h
+++ b/webkit/fileapi/file_system_file_util.h
@@ -127,6 +127,27 @@ class FileSystemFileUtil {
protected:
FileSystemFileUtil() { }
+
+ // This also removes the destination directory if it's non-empty and all
+ // other checks are passed (so that the copy/move correctly overwrites the
+ // destination).
+ PlatformFileError PerformCommonCheckAndPreparationForMoveAndCopy(
+ FileSystemOperationContext* unused,
+ const FilePath& src_file_path,
+ const FilePath& dest_file_path);
+
+ virtual bool PathExists(
+ FileSystemOperationContext* unused,
+ const FilePath& file_path);
+
+ virtual bool DirectoryExists(
+ FileSystemOperationContext* unused,
+ const FilePath& file_path);
+
+ virtual bool IsDirectoryEmpty(
+ FileSystemOperationContext* unused,
+ const FilePath& file_path);
+
friend struct DefaultSingletonTraits<FileSystemFileUtil>;
DISALLOW_COPY_AND_ASSIGN(FileSystemFileUtil);
};