diff options
-rw-r--r-- | webkit/fileapi/syncable/canned_syncable_file_system.cc | 22 | ||||
-rw-r--r-- | webkit/fileapi/syncable/canned_syncable_file_system.h | 4 |
2 files changed, 26 insertions, 0 deletions
diff --git a/webkit/fileapi/syncable/canned_syncable_file_system.cc b/webkit/fileapi/syncable/canned_syncable_file_system.cc index 50e4c51..84cdc92 100644 --- a/webkit/fileapi/syncable/canned_syncable_file_system.cc +++ b/webkit/fileapi/syncable/canned_syncable_file_system.cc @@ -99,6 +99,28 @@ PlatformFileError CannedSyncableFileSystem::CreateFile( return result_; } +PlatformFileError CannedSyncableFileSystem::Copy( + const FileSystemURL& src_url, const FileSystemURL& dest_url) { + result_ = base::PLATFORM_FILE_ERROR_FAILED; + test_helper_.NewOperation()->Copy( + src_url, dest_url, + base::Bind(&CannedSyncableFileSystem::StatusCallback, + weak_factory_.GetWeakPtr())); + MessageLoop::current()->RunAllPending(); + return result_; +} + +PlatformFileError CannedSyncableFileSystem::Move( + const FileSystemURL& src_url, const FileSystemURL& dest_url) { + result_ = base::PLATFORM_FILE_ERROR_FAILED; + test_helper_.NewOperation()->Move( + src_url, dest_url, + base::Bind(&CannedSyncableFileSystem::StatusCallback, + weak_factory_.GetWeakPtr())); + MessageLoop::current()->RunAllPending(); + return result_; +} + PlatformFileError CannedSyncableFileSystem::TruncateFile( const FileSystemURL& url, int64 size) { result_ = base::PLATFORM_FILE_ERROR_FAILED; diff --git a/webkit/fileapi/syncable/canned_syncable_file_system.h b/webkit/fileapi/syncable/canned_syncable_file_system.h index e8935f7..d0b2b2358 100644 --- a/webkit/fileapi/syncable/canned_syncable_file_system.h +++ b/webkit/fileapi/syncable/canned_syncable_file_system.h @@ -63,6 +63,10 @@ class CannedSyncableFileSystem { // (They run on the current thread and returns synchronously). base::PlatformFileError CreateDirectory(const FileSystemURL& url); base::PlatformFileError CreateFile(const FileSystemURL& url); + base::PlatformFileError Copy(const FileSystemURL& src_url, + const FileSystemURL& dest_url); + base::PlatformFileError Move(const FileSystemURL& src_url, + const FileSystemURL& dest_url); base::PlatformFileError TruncateFile(const FileSystemURL& url, int64 size); base::PlatformFileError Remove(const FileSystemURL& url, bool recursive); |