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

Unified Diff: webkit/fileapi/file_system_file_util_proxy.h

Issue 8423041: Revert 108258 - broke Mac LayoutTests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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 | « base/file_util_proxy.cc ('k') | webkit/fileapi/file_system_file_util_proxy.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_proxy.h
===================================================================
--- webkit/fileapi/file_system_file_util_proxy.h (revision 108273)
+++ webkit/fileapi/file_system_file_util_proxy.h (working copy)
@@ -36,6 +36,7 @@
typedef base::FileUtilProxy::Entry Entry;
typedef base::FileUtilProxy::StatusCallback StatusCallback;
+ typedef base::FileUtilProxy::CreateOrOpenCallback CreateOrOpenCallback;
typedef base::Callback<void(PlatformFileError,
bool /* created */
)> EnsureFileExistsCallback;
@@ -51,6 +52,23 @@
const FilePath& /* local_path, where possible */
>::Type GetLocalPathCallback;
+ // 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,
+ const CreateOrOpenCallback& callback);
+
+ // Close the given file handle.
+ static bool Close(const FileSystemOperationContext& context,
+ scoped_refptr<MessageLoopProxy> message_loop_proxy,
+ PlatformFile,
+ const StatusCallback& callback);
+
// Ensures that the given |file_path| exist. This creates a empty new file
// at |file_path| if the |file_path| does not exist.
// If a new file han not existed and is created at the |file_path|,
« no previous file with comments | « base/file_util_proxy.cc ('k') | webkit/fileapi/file_system_file_util_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698