| Index: webkit/fileapi/file_system_file_util_proxy.cc
|
| diff --git a/webkit/fileapi/file_system_file_util_proxy.cc b/webkit/fileapi/file_system_file_util_proxy.cc
|
| index b9ce0966d2009a1880b0f573823674700ec219e9..728d6e6391f4c3cf85f19922bf8e8b9a393ec18e 100644
|
| --- a/webkit/fileapi/file_system_file_util_proxy.cc
|
| +++ b/webkit/fileapi/file_system_file_util_proxy.cc
|
| @@ -108,15 +108,28 @@ class ReadDirectoryHelper {
|
| } // namespace
|
|
|
| // static
|
| -bool FileSystemFileUtilProxy::Delete(
|
| +bool FileSystemFileUtilProxy::DeleteFile(
|
| + FileSystemOperationContext* context,
|
| + FileSystemFileUtil* file_util,
|
| + const FileSystemURL& url,
|
| + const StatusCallback& callback) {
|
| + return base::PostTaskAndReplyWithResult(
|
| + context->task_runner(), FROM_HERE,
|
| + Bind(&FileSystemFileUtil::DeleteFile, Unretained(file_util),
|
| + context, url),
|
| + callback);
|
| +}
|
| +
|
| +// static
|
| +bool FileSystemFileUtilProxy::DeleteDirectory(
|
| FileSystemOperationContext* context,
|
| FileSystemFileUtil* file_util,
|
| const FileSystemURL& url,
|
| - bool recursive,
|
| const StatusCallback& callback) {
|
| return base::PostTaskAndReplyWithResult(
|
| context->task_runner(), FROM_HERE,
|
| - Bind(&FileUtilHelper::Delete, context, file_util, url, recursive),
|
| + Bind(&FileSystemFileUtil::DeleteDirectory, Unretained(file_util),
|
| + context, url),
|
| callback);
|
| }
|
|
|
| @@ -137,46 +150,44 @@ bool FileSystemFileUtilProxy::CreateOrOpen(
|
| }
|
|
|
| // static
|
| -bool FileSystemFileUtilProxy::Copy(
|
| +bool FileSystemFileUtilProxy::CopyLocalFile(
|
| FileSystemOperationContext* context,
|
| - FileSystemFileUtil* src_util,
|
| - FileSystemFileUtil* dest_util,
|
| + FileSystemFileUtil* file_util,
|
| const FileSystemURL& src_url,
|
| const FileSystemURL& dest_url,
|
| const StatusCallback& callback) {
|
| return base::PostTaskAndReplyWithResult(
|
| context->task_runner(), FROM_HERE,
|
| - Bind(&FileUtilHelper::Copy,
|
| - context, src_util, dest_util, src_url, dest_url),
|
| + Bind(&FileSystemFileUtil::CopyOrMoveFile, Unretained(file_util),
|
| + context, src_url, dest_url, true /* copy */),
|
| callback);
|
| }
|
|
|
| // static
|
| -bool FileSystemFileUtilProxy::CopyInForeignFile(
|
| +bool FileSystemFileUtilProxy::MoveLocalFile(
|
| FileSystemOperationContext* context,
|
| - FileSystemFileUtil* dest_util,
|
| - const FilePath& src_local_disk_file_path,
|
| + FileSystemFileUtil* file_util,
|
| + const FileSystemURL& src_url,
|
| const FileSystemURL& dest_url,
|
| const StatusCallback& callback) {
|
| return base::PostTaskAndReplyWithResult(
|
| context->task_runner(), FROM_HERE,
|
| - Bind(&FileSystemFileUtil::CopyInForeignFile, Unretained(dest_util),
|
| - context, src_local_disk_file_path, dest_url),
|
| + Bind(&FileSystemFileUtil::CopyOrMoveFile, Unretained(file_util),
|
| + context, src_url, dest_url, false /* copy */),
|
| callback);
|
| }
|
|
|
| // static
|
| -bool FileSystemFileUtilProxy::Move(
|
| +bool FileSystemFileUtilProxy::CopyInForeignFile(
|
| FileSystemOperationContext* context,
|
| - FileSystemFileUtil* src_util,
|
| - FileSystemFileUtil* dest_util,
|
| - const FileSystemURL& src_url,
|
| - const FileSystemURL& dest_url,
|
| + FileSystemFileUtil* file_util,
|
| + const FilePath& src_local_disk_file_path,
|
| + const FileSystemURL& dest_url,
|
| const StatusCallback& callback) {
|
| return base::PostTaskAndReplyWithResult(
|
| context->task_runner(), FROM_HERE,
|
| - Bind(&FileUtilHelper::Move,
|
| - context, src_util, dest_util, src_url, dest_url),
|
| + Bind(&FileSystemFileUtil::CopyInForeignFile, Unretained(file_util),
|
| + context, src_local_disk_file_path, dest_url),
|
| callback);
|
| }
|
|
|
|
|