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

Unified Diff: webkit/fileapi/file_system_file_util.h

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 | « no previous file | webkit/fileapi/file_system_file_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/file_system_file_util.h
diff --git a/webkit/fileapi/file_system_file_util.h b/webkit/fileapi/file_system_file_util.h
index 5df8cd4f164ed01ef7e49f2014612eb005591532..d6b72e6ff99fe9fbdc88b84362ec88d7677d239f 100644
--- a/webkit/fileapi/file_system_file_util.h
+++ b/webkit/fileapi/file_system_file_util.h
@@ -116,6 +116,14 @@ class FileSystemFileUtil {
const FilePath& dest_file_path,
bool copy);
+ // Copies in a single file from a different filesystem. The src_file_path is
+ // a true local platform path, regardless of which subclass of
+ // FileSystemFileUtil is being invoked.
+ virtual PlatformFileError CopyInForeignFile(
+ FileSystemOperationContext* context,
+ const FilePath& src_file_path,
+ const FilePath& dest_file_path);
+
// Copies a file or a directory from |src_file_path| to |dest_file_path|.
//
// Error cases:
@@ -254,6 +262,16 @@ class FileSystemFileUtil {
const FilePath& dest_file_path,
bool copy);
+ // Determines whether a simple same-filesystem move or copy can be done. If
+ // so, it delegates to CopyOrMoveFile. Otherwise it looks up the true
+ // platform path of the source file, delegates to CopyInForeignFile, and [for
+ // move] calls DeleteFile on the source file.
+ PlatformFileError CopyOrMoveFileHelper(
+ FileSystemOperationContext* context,
+ const FilePath& src_file_path,
+ const FilePath& dest_file_path,
+ bool copy);
+
// Returns a pointer to a new instance of AbstractFileEnumerator which is
// implemented for each FileUtil subclass. The instance needs to be freed
// by the caller, and its lifetime should not extend past when the current
« no previous file with comments | « no previous file | webkit/fileapi/file_system_file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698