Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Unified Diff: webkit/fileapi/local_file_system_file_util.cc

Issue 7066033: Enable cross-filesystem moves and copies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Readability tweak from Michael Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/fileapi/local_file_system_file_util.h ('k') | webkit/fileapi/obfuscated_file_system_file_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/local_file_system_file_util.cc
diff --git a/webkit/fileapi/local_file_system_file_util.cc b/webkit/fileapi/local_file_system_file_util.cc
index cd605ce7513a5b64dd74b155995078652d4b5eee..8b9e5d70ccfc67279640dc116219627af60ed71f 100644
--- a/webkit/fileapi/local_file_system_file_util.cc
+++ b/webkit/fileapi/local_file_system_file_util.cc
@@ -121,6 +121,21 @@ PlatformFileError LocalFileSystemFileUtil::CopyOrMoveFile(
context, local_src_path, local_dest_path, copy);
}
+PlatformFileError LocalFileSystemFileUtil::CopyInForeignFile(
+ FileSystemOperationContext* context,
+ const FilePath& src_file_path,
+ const FilePath& dest_file_path) {
+ if (src_file_path.empty())
+ return base::PLATFORM_FILE_ERROR_INVALID_OPERATION;
+ FilePath local_dest_path =
+ GetLocalPath(context, context->dest_origin_url(), context->dest_type(),
+ dest_file_path);
+ if (local_dest_path.empty())
+ return base::PLATFORM_FILE_ERROR_INVALID_OPERATION;
+ return QuotaFileUtil::GetInstance()->CopyOrMoveFile(
+ context, src_file_path, local_dest_path, true);
+}
+
PlatformFileError LocalFileSystemFileUtil::DeleteFile(
FileSystemOperationContext* context,
const FilePath& file_path) {
« no previous file with comments | « webkit/fileapi/local_file_system_file_util.h ('k') | webkit/fileapi/obfuscated_file_system_file_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698