| Index: webkit/browser/fileapi/file_system_operation.h
|
| diff --git a/webkit/browser/fileapi/file_system_operation.h b/webkit/browser/fileapi/file_system_operation.h
|
| index cc35be46b3608ecb0ccadb3c983f2350bb20bc4f..4261a2bd39a8aae759caaec9db4b60e104c4975d 100644
|
| --- a/webkit/browser/fileapi/file_system_operation.h
|
| +++ b/webkit/browser/fileapi/file_system_operation.h
|
| @@ -10,7 +10,6 @@
|
| #include "base/callback.h"
|
| #include "base/files/file.h"
|
| #include "base/files/file_path.h"
|
| -#include "base/platform_file.h"
|
| #include "base/process/process.h"
|
| #include "webkit/browser/fileapi/file_system_operation_context.h"
|
| #include "webkit/browser/webkit_storage_browser_export.h"
|
| @@ -75,12 +74,11 @@ class FileSystemOperation {
|
| void(base::File::Error result,
|
| const base::File::Info& file_info)> GetMetadataCallback;
|
|
|
| - // Used for OpenFile(). |result| is the return code of the operation.
|
| - // |on_close_callback| will be called after the file is closed in the child
|
| - // process. It can be null, if no operation is needed on closing a file.
|
| + // Used for OpenFile(). |on_close_callback| will be called after the file is
|
| + // closed in the child process. It can be null, if no operation is needed on
|
| + // closing a file.
|
| typedef base::Callback<
|
| - void(base::File::Error result,
|
| - base::PlatformFile file,
|
| + void(base::File file,
|
| const base::Closure& on_close_callback)> OpenFileCallback;
|
|
|
| // Used for ReadDirectoryCallback.
|
| @@ -330,11 +328,11 @@ class FileSystemOperation {
|
| //
|
| // // Dispatch ABORT error for the current operation by invoking
|
| // // the callback function for the ongoing operation,
|
| - // operation_callback.Run(base::PLATFORM_FILE_ERROR_ABORT, ...);
|
| + // operation_callback.Run(base::File::FILE_ERROR_ABORT, ...);
|
| //
|
| // // Dispatch 'success' for the cancel (or dispatch appropriate
|
| // // error code with DidFail() if the cancel has somehow failed).
|
| - // cancel_callback.Run(base::PLATFORM_FILE_OK);
|
| + // cancel_callback.Run(base::File::FILE_OK);
|
| // }
|
| //
|
| // Note that, for reporting failure, the callback function passed to a
|
| @@ -353,7 +351,7 @@ class FileSystemOperation {
|
| const StatusCallback& callback) = 0;
|
|
|
| // Opens a file at |path| with |file_flags|, where flags are OR'ed
|
| - // values of base::PlatformFileFlags.
|
| + // values of base::File::Flags.
|
| //
|
| // This function is used only by Pepper as of writing.
|
| virtual void OpenFile(const FileSystemURL& path,
|
| @@ -374,11 +372,11 @@ class FileSystemOperation {
|
| // Copies in a single file from a different filesystem.
|
| //
|
| // This returns:
|
| - // - PLATFORM_FILE_ERROR_NOT_FOUND if |src_file_path|
|
| + // - File::FILE_ERROR_NOT_FOUND if |src_file_path|
|
| // or the parent directory of |dest_url| does not exist.
|
| - // - PLATFORM_FILE_ERROR_INVALID_OPERATION if |dest_url| exists and
|
| + // - File::FILE_ERROR_INVALID_OPERATION if |dest_url| exists and
|
| // is not a file.
|
| - // - PLATFORM_FILE_ERROR_FAILED if |dest_url| does not exist and
|
| + // - File::FILE_ERROR_FAILED if |dest_url| does not exist and
|
| // its parent path is a file.
|
| //
|
| virtual void CopyInForeignFile(const base::FilePath& src_local_disk_path,
|
| @@ -388,8 +386,8 @@ class FileSystemOperation {
|
| // Removes a single file.
|
| //
|
| // This returns:
|
| - // - PLATFORM_FILE_ERROR_NOT_FOUND if |url| does not exist.
|
| - // - PLATFORM_FILE_ERROR_NOT_A_FILE if |url| is not a file.
|
| + // - File::FILE_ERROR_NOT_FOUND if |url| does not exist.
|
| + // - File::FILE_ERROR_NOT_A_FILE if |url| is not a file.
|
| //
|
| virtual void RemoveFile(const FileSystemURL& url,
|
| const StatusCallback& callback) = 0;
|
| @@ -397,9 +395,9 @@ class FileSystemOperation {
|
| // Removes a single empty directory.
|
| //
|
| // This returns:
|
| - // - PLATFORM_FILE_ERROR_NOT_FOUND if |url| does not exist.
|
| - // - PLATFORM_FILE_ERROR_NOT_A_DIRECTORY if |url| is not a directory.
|
| - // - PLATFORM_FILE_ERROR_NOT_EMPTY if |url| is not empty.
|
| + // - File::FILE_ERROR_NOT_FOUND if |url| does not exist.
|
| + // - File::FILE_ERROR_NOT_A_DIRECTORY if |url| is not a directory.
|
| + // - File::FILE_ERROR_NOT_EMPTY if |url| is not empty.
|
| //
|
| virtual void RemoveDirectory(const FileSystemURL& url,
|
| const StatusCallback& callback) = 0;
|
| @@ -414,12 +412,12 @@ class FileSystemOperation {
|
| // optional.
|
| //
|
| // This returns:
|
| - // - PLATFORM_FILE_ERROR_NOT_FOUND if |src_url|
|
| + // - File::FILE_ERROR_NOT_FOUND if |src_url|
|
| // or the parent directory of |dest_url| does not exist.
|
| - // - PLATFORM_FILE_ERROR_NOT_A_FILE if |src_url| exists but is not a file.
|
| - // - PLATFORM_FILE_ERROR_INVALID_OPERATION if |dest_url| exists and
|
| + // - File::FILE_ERROR_NOT_A_FILE if |src_url| exists but is not a file.
|
| + // - File::FILE_ERROR_INVALID_OPERATION if |dest_url| exists and
|
| // is not a file.
|
| - // - PLATFORM_FILE_ERROR_FAILED if |dest_url| does not exist and
|
| + // - File::FILE_ERROR_FAILED if |dest_url| does not exist and
|
| // its parent path is a file.
|
| //
|
| virtual void CopyFileLocal(const FileSystemURL& src_url,
|
| @@ -435,12 +433,12 @@ class FileSystemOperation {
|
| // comment for details.
|
| //
|
| // This returns:
|
| - // - PLATFORM_FILE_ERROR_NOT_FOUND if |src_url|
|
| + // - File::FILE_ERROR_NOT_FOUND if |src_url|
|
| // or the parent directory of |dest_url| does not exist.
|
| - // - PLATFORM_FILE_ERROR_NOT_A_FILE if |src_url| exists but is not a file.
|
| - // - PLATFORM_FILE_ERROR_INVALID_OPERATION if |dest_url| exists and
|
| + // - File::FILE_ERROR_NOT_A_FILE if |src_url| exists but is not a file.
|
| + // - File::FILE_ERROR_INVALID_OPERATION if |dest_url| exists and
|
| // is not a file.
|
| - // - PLATFORM_FILE_ERROR_FAILED if |dest_url| does not exist and
|
| + // - File::FILE_ERROR_FAILED if |dest_url| does not exist and
|
| // its parent path is a file.
|
| //
|
| virtual void MoveFileLocal(const FileSystemURL& src_url,
|
| @@ -451,7 +449,7 @@ class FileSystemOperation {
|
| // Synchronously gets the platform path for the given |url|.
|
| // This may fail if the given |url|'s filesystem type is neither
|
| // temporary nor persistent.
|
| - // In such a case, base::PLATFORM_FILE_ERROR_INVALID_OPERATION will be
|
| + // In such a case, base::File::FILE_ERROR_INVALID_OPERATION will be
|
| // returned.
|
| virtual base::File::Error SyncGetPlatformPath(
|
| const FileSystemURL& url,
|
|
|