Make sure we close the file_handle when we create (but not open) a new file
1. Add FileUtilProxy::Create that does not leave a file_handle opened.
2. Update the file_util_operation to use FileUtilProxy::Create instead of FileUtilProxy::CreateOrOpen so that no other tasks get queued in before we close the handle.
BUG=58424,58473
TEST=fast/filesystem/
Review URL: http://codereview.chromium.org/3717001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62192 0039d316-1c4b-4281-b951-d872f2087c98
CrOS-Libchrome-Original-Commit: cc378a1cc341ecfb60aeaba995ea0b442c9bc83e
diff --git a/base/file_util_proxy.h b/base/file_util_proxy.h
index e716ab7..11fc988 100644
--- a/base/file_util_proxy.h
+++ b/base/file_util_proxy.h
@@ -48,6 +48,13 @@
int file_flags,
CreateOrOpenCallback* callback);
+ // Creates a file with the given flags. This one is a variation of
+ // CreateOrOpen but it doesn't return a file handle.
+ static bool Create(scoped_refptr<MessageLoopProxy> message_loop_proxy,
+ const FilePath& file_path,
+ int file_flags,
+ CreateOrOpenCallback* callback);
+
// Creates a temporary file for writing. The path and an open file handle
// are returned. It is invalid to pass NULL for the callback.
typedef Callback3<base::PlatformFileError /* error code */,