diff options
author | Andras Becsi <andras.becsi@digia.com> | 2014-03-18 13:16:26 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-03-20 15:55:39 +0100 |
commit | 3f0f86b0caed75241fa71c95a5d73bc0164348c5 (patch) | |
tree | 92b9fb00f2e9e90b0be2262093876d4f43b6cd13 /chromium/webkit/browser/fileapi/file_system_operation.h | |
parent | e90d7c4b152c56919d963987e2503f9909a666d2 (diff) | |
download | qtwebengine-chromium-3f0f86b0caed75241fa71c95a5d73bc0164348c5.tar.gz |
Update to new stable branch 1750
This also includes an updated ninja and chromium dependencies
needed on Windows.
Change-Id: Icd597d80ed3fa4425933c9f1334c3c2e31291c42
Reviewed-by: Zoltan Arvai <zarvai@inf.u-szeged.hu>
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Diffstat (limited to 'chromium/webkit/browser/fileapi/file_system_operation.h')
-rw-r--r-- | chromium/webkit/browser/fileapi/file_system_operation.h | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/chromium/webkit/browser/fileapi/file_system_operation.h b/chromium/webkit/browser/fileapi/file_system_operation.h index 99d3b3d6a97..ded87f71ec2 100644 --- a/chromium/webkit/browser/fileapi/file_system_operation.h +++ b/chromium/webkit/browser/fileapi/file_system_operation.h @@ -80,8 +80,7 @@ class FileSystemOperation { typedef base::Callback< void(base::PlatformFileError result, base::PlatformFile file, - const base::Closure& on_close_callback, - base::ProcessHandle peer_handle)> OpenFileCallback; + const base::Closure& on_close_callback)> OpenFileCallback; // Used for ReadDirectoryCallback. typedef std::vector<DirectoryEntry> FileEntryList; @@ -209,6 +208,18 @@ class FileSystemOperation { // set to the copied file size. typedef base::Callback<void(int64 size)> CopyFileProgressCallback; + // The option for copy or move operation. + enum CopyOrMoveOption { + // No additional operation. + OPTION_NONE, + + // Preserves last modified time if possible. If the operation to update + // last modified time is not supported on the file system for the + // destination file, this option would be simply ignored (i.e. Copy would + // be successfully done without preserving last modified time). + OPTION_PRESERVE_LAST_MODIFIED, + }; + // Used for Write(). typedef base::Callback<void(base::PlatformFileError result, int64 bytes, @@ -233,6 +244,8 @@ class FileSystemOperation { // |src_path| is a directory, the contents of |src_path| are copied to // |dest_path| recursively. A new file or directory is created at // |dest_path| as needed. + // |option| specifies the minor behavior of Copy(). See CopyOrMoveOption's + // comment for details. // |progress_callback| is periodically called to report the progress // update. See also the comment of CopyProgressCallback. This callback is // optional. @@ -247,11 +260,14 @@ class FileSystemOperation { // virtual void Copy(const FileSystemURL& src_path, const FileSystemURL& dest_path, + CopyOrMoveOption option, const CopyProgressCallback& progress_callback, const StatusCallback& callback) = 0; // Moves a file or directory from |src_path| to |dest_path|. A new file // or directory is created at |dest_path| as needed. + // |option| specifies the minor behavior of Copy(). See CopyOrMoveOption's + // comment for details. // // For recursive case this internally creates new FileSystemOperations and // calls: @@ -263,6 +279,7 @@ class FileSystemOperation { // virtual void Move(const FileSystemURL& src_path, const FileSystemURL& dest_path, + CopyOrMoveOption option, const StatusCallback& callback) = 0; // Checks if a directory is present at |path|. @@ -337,13 +354,9 @@ class FileSystemOperation { // Opens a file at |path| with |file_flags|, where flags are OR'ed // values of base::PlatformFileFlags. // - // |peer_handle| is the process handle of a pepper plugin process, which - // is necessary for underlying IPC calls with Pepper plugins. - // // This function is used only by Pepper as of writing. virtual void OpenFile(const FileSystemURL& path, int file_flags, - base::ProcessHandle peer_handle, const OpenFileCallback& callback) = 0; // Creates a local snapshot file for a given |path| and returns the @@ -393,6 +406,8 @@ class FileSystemOperation { // Copies a file from |src_url| to |dest_url|. // This must be called for files that belong to the same filesystem // (i.e. type() and origin() of the |src_url| and |dest_url| must match). + // |option| specifies the minor behavior of Copy(). See CopyOrMoveOption's + // comment for details. // |progress_callback| is periodically called to report the progress // update. See also the comment of CopyFileProgressCallback. This callback is // optional. @@ -408,12 +423,15 @@ class FileSystemOperation { // virtual void CopyFileLocal(const FileSystemURL& src_url, const FileSystemURL& dest_url, + CopyOrMoveOption option, const CopyFileProgressCallback& progress_callback, const StatusCallback& callback) = 0; // Moves a local file from |src_url| to |dest_url|. // This must be called for files that belong to the same filesystem // (i.e. type() and origin() of the |src_url| and |dest_url| must match). + // |option| specifies the minor behavior of Copy(). See CopyOrMoveOption's + // comment for details. // // This returns: // - PLATFORM_FILE_ERROR_NOT_FOUND if |src_url| @@ -426,6 +444,7 @@ class FileSystemOperation { // virtual void MoveFileLocal(const FileSystemURL& src_url, const FileSystemURL& dest_url, + CopyOrMoveOption option, const StatusCallback& callback) = 0; // Synchronously gets the platform path for the given |url|. |