From d292409206bdfee695b72eae60279a15acb0acd8 Mon Sep 17 00:00:00 2001 From: "kinuko@chromium.org" Date: Tue, 5 Oct 2010 05:33:39 +0000 Subject: 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 --- chrome/browser/file_system/file_system_dispatcher_host.cc | 5 +++-- chrome/browser/file_system/file_system_dispatcher_host.h | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'chrome/browser/file_system') diff --git a/chrome/browser/file_system/file_system_dispatcher_host.cc b/chrome/browser/file_system/file_system_dispatcher_host.cc index 6dd6072..96571ce 100644 --- a/chrome/browser/file_system/file_system_dispatcher_host.cc +++ b/chrome/browser/file_system/file_system_dispatcher_host.cc @@ -161,10 +161,11 @@ void FileSystemDispatcherHost::OnCopy( GetNewOperation(request_id)->Copy(src_path, dest_path); } -void FileSystemDispatcherHost::OnRemove(int request_id, const FilePath& path) { +void FileSystemDispatcherHost::OnRemove( + int request_id, const FilePath& path, bool recursive) { if (!CheckValidFileSystemPath(path, request_id)) return; - GetNewOperation(request_id)->Remove(path); + GetNewOperation(request_id)->Remove(path, recursive); } void FileSystemDispatcherHost::OnReadMetadata( diff --git a/chrome/browser/file_system/file_system_dispatcher_host.h b/chrome/browser/file_system/file_system_dispatcher_host.h index 22a560a..68110be 100644 --- a/chrome/browser/file_system/file_system_dispatcher_host.h +++ b/chrome/browser/file_system/file_system_dispatcher_host.h @@ -21,7 +21,6 @@ namespace base { class Time; } -class ChromeFileSystemOperation; class FileSystemHostContext; class GURL; class HostContentSettingsMap; @@ -50,7 +49,7 @@ class FileSystemDispatcherHost void OnCopy(int request_id, const FilePath& src_path, const FilePath& dest_path); - void OnRemove(int request_id, const FilePath& path); + void OnRemove(int request_id, const FilePath& path, bool recursive); void OnReadMetadata(int request_id, const FilePath& path); void OnCreate(int request_id, const FilePath& path, -- cgit v1.1