diff options
author | kinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-11 22:00:55 +0000 |
---|---|---|
committer | kinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-11 22:00:55 +0000 |
commit | cc378a1cc341ecfb60aeaba995ea0b442c9bc83e (patch) | |
tree | 0b96d0b3337c318b14c1cf507a14fca1ada53d6d /webkit/fileapi | |
parent | 96209ccda702ea92fd257a17d8a70f93bce0ddb5 (diff) | |
download | chromium_src-cc378a1cc341ecfb60aeaba995ea0b442c9bc83e.zip chromium_src-cc378a1cc341ecfb60aeaba995ea0b442c9bc83e.tar.gz chromium_src-cc378a1cc341ecfb60aeaba995ea0b442c9bc83e.tar.bz2 |
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
Diffstat (limited to 'webkit/fileapi')
-rw-r--r-- | webkit/fileapi/file_system_operation.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/webkit/fileapi/file_system_operation.cc b/webkit/fileapi/file_system_operation.cc index 29690b9..e15de4c 100644 --- a/webkit/fileapi/file_system_operation.cc +++ b/webkit/fileapi/file_system_operation.cc @@ -36,7 +36,7 @@ void FileSystemOperation::CreateFile(const FilePath& path, pending_operation_ = kOperationCreateFile; #endif - base::FileUtilProxy::CreateOrOpen( + base::FileUtilProxy::Create( proxy_, path, base::PLATFORM_FILE_CREATE | base::PLATFORM_FILE_READ, callback_factory_.NewCallback( exclusive ? &FileSystemOperation::DidCreateFileExclusive @@ -145,7 +145,7 @@ void FileSystemOperation::Write( file_writer_delegate_.reset(new FileWriterDelegate(this, offset)); blob_request_.reset(new URLRequest(blob_url, file_writer_delegate_.get())); blob_request_->set_context(url_request_context); - base::FileUtilProxy::CreateOrOpen( + base::FileUtilProxy::Create( proxy_, path, base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_WRITE | |