| Index: webkit/fileapi/file_system_file_util_proxy.h
|
| diff --git a/webkit/fileapi/file_system_file_util_proxy.h b/webkit/fileapi/file_system_file_util_proxy.h
|
| index e3763145e29f579c13c8ea1cee94bb851688784b..e79c19a40d91d6052caa1509335a31553dd2570a 100644
|
| --- a/webkit/fileapi/file_system_file_util_proxy.h
|
| +++ b/webkit/fileapi/file_system_file_util_proxy.h
|
| @@ -33,7 +33,11 @@ using base::PlatformFileInfo;
|
| class FileSystemFileUtilProxy {
|
| public:
|
| typedef base::FileUtilProxy::StatusCallback StatusCallback;
|
| - typedef base::FileUtilProxy::CreateOrOpenCallback CreateOrOpenCallback;
|
| + typedef Callback4<PlatformFileError /* error code */,
|
| + base::PassPlatformFile,
|
| + bool /* created */,
|
| + int64 /* file_size, or -1 when there was an error. */
|
| + >::Type CreateOrOpenCallback;
|
| typedef base::FileUtilProxy::EnsureFileExistsCallback
|
| EnsureFileExistsCallback;
|
| typedef Callback3<PlatformFileError /* error code */,
|
| @@ -45,16 +49,19 @@ class FileSystemFileUtilProxy {
|
| >::Type GetLocalPathCallback;
|
| typedef base::FileUtilProxy::ReadDirectoryCallback ReadDirectoryCallback;
|
|
|
| - // Creates or opens a file with the given flags. It is invalid to pass NULL
|
| - // for the callback.
|
| + // Creates or opens a file with the given flags.
|
| + // It is invalid to pass NULL for the callback.
|
| // If PLATFORM_FILE_CREATE is set in |file_flags| it always tries to create
|
| // a new file at the given |file_path| and calls back with
|
| // PLATFORM_FILE_ERROR_FILE_EXISTS if the |file_path| already exists.
|
| - static bool CreateOrOpen(const FileSystemOperationContext& context,
|
| - scoped_refptr<MessageLoopProxy> message_loop_proxy,
|
| - const FilePath& file_path,
|
| - int file_flags,
|
| - CreateOrOpenCallback* callback);
|
| + // |file_size| parameter of the CreateOrOpenCallback is set to -1 if
|
| + // the error code is not PLATFORM_FILE_OK.
|
| + static bool CreateOrOpenAndQuerySize(
|
| + const FileSystemOperationContext& context,
|
| + scoped_refptr<MessageLoopProxy> message_loop_proxy,
|
| + const FilePath& file_path,
|
| + int file_flags,
|
| + CreateOrOpenCallback* callback);
|
|
|
| // Close the given file handle.
|
| static bool Close(const FileSystemOperationContext& context,
|
|
|