Chromium Code Reviews| 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..9977e0d9858fb60f11ade7159151554dac33db06 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 */ |
|
brettw
2011/07/19 20:29:31
Can you document what will happen on failure? Like
kinuko
2011/07/20 13:39:35
Done.
|
| + >::Type CreateOrOpenCallback; |
| typedef base::FileUtilProxy::EnsureFileExistsCallback |
| EnsureFileExistsCallback; |
| typedef Callback3<PlatformFileError /* error code */, |
| @@ -45,16 +49,18 @@ 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. This also returns the |
|
brettw
2011/07/19 20:29:31
This comment initially confused me since this func
kinuko
2011/07/20 13:39:35
Removed.
|
| + // file size for the opened file. |
| + // 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); |
| + 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, |