summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi/file_system_operation.cc
diff options
context:
space:
mode:
authorkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-05 05:33:39 +0000
committerkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-05 05:33:39 +0000
commitd292409206bdfee695b72eae60279a15acb0acd8 (patch)
tree1991c7c6a67eb83973d8ae5cc1ec4c40ba025271 /webkit/fileapi/file_system_operation.cc
parentfaec631688b3e0c87032d95a47cc945613431f45 (diff)
downloadchromium_src-d292409206bdfee695b72eae60279a15acb0acd8.zip
chromium_src-d292409206bdfee695b72eae60279a15acb0acd8.tar.gz
chromium_src-d292409206bdfee695b72eae60279a15acb0acd8.tar.bz2
Support removeRecursively and new copy/move behaviors added to the spec recently.
http://lists.w3.org/Archives/Public/public-webapps/2010JulSep/1101.html > For a move/copy of a file on top of existing file, or a directory on > top of an existing empty directory, you get an automatic overwrite. > A move/copy of a file on top of an existing directory, or of a > directory on top of an existing file, will always fail. > A move/copy of a file or directory on top of an existing non-empty > directory will always fail. BUG=32277 TEST=FileSystemOperationTest.* Review URL: http://codereview.chromium.org/3567012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61480 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/fileapi/file_system_operation.cc')
-rw-r--r--webkit/fileapi/file_system_operation.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/webkit/fileapi/file_system_operation.cc b/webkit/fileapi/file_system_operation.cc
index e636420..29336a8 100644
--- a/webkit/fileapi/file_system_operation.cc
+++ b/webkit/fileapi/file_system_operation.cc
@@ -118,14 +118,15 @@ void FileSystemOperation::ReadDirectory(const FilePath& path) {
&FileSystemOperation::DidReadDirectory));
}
-void FileSystemOperation::Remove(const FilePath& path) {
+void FileSystemOperation::Remove(const FilePath& path, bool recursive) {
#ifndef NDEBUG
DCHECK(kOperationNone == pending_operation_);
pending_operation_ = kOperationRemove;
#endif
- base::FileUtilProxy::Delete(proxy_, path, callback_factory_.NewCallback(
- &FileSystemOperation::DidFinishFileOperation));
+ base::FileUtilProxy::Delete(proxy_, path, recursive,
+ callback_factory_.NewCallback(
+ &FileSystemOperation::DidFinishFileOperation));
}
void FileSystemOperation::Write(