| Index: webkit/fileapi/local_file_system_operation.cc
|
| diff --git a/webkit/fileapi/local_file_system_operation.cc b/webkit/fileapi/local_file_system_operation.cc
|
| index 1bd0e521ad7e0d225328cfff44e74122a8cbaa1d..de6ebb68fa41ad7ebf649f42bd0ebbdd7d2235bb 100644
|
| --- a/webkit/fileapi/local_file_system_operation.cc
|
| +++ b/webkit/fileapi/local_file_system_operation.cc
|
| @@ -32,6 +32,10 @@ using webkit_blob::ShareableFileReference;
|
|
|
| namespace fileapi {
|
|
|
| +namespace {
|
| +void NopCloseFileCallback() {}
|
| +}
|
| +
|
| LocalFileSystemOperation::LocalFileSystemOperation(
|
| FileSystemContext* file_system_context,
|
| scoped_ptr<FileSystemOperationContext> operation_context)
|
| @@ -331,7 +335,9 @@ void LocalFileSystemOperation::OpenFile(const FileSystemURL& url,
|
| (base::PLATFORM_FILE_ENUMERATE | base::PLATFORM_FILE_TEMPORARY |
|
| base::PLATFORM_FILE_HIDDEN))) {
|
| callback.Run(base::PLATFORM_FILE_ERROR_FAILED,
|
| - base::PlatformFile(), base::ProcessHandle());
|
| + base::PlatformFile(),
|
| + base::Closure(),
|
| + base::ProcessHandle());
|
| return;
|
| }
|
| if (file_flags &
|
| @@ -342,13 +348,19 @@ void LocalFileSystemOperation::OpenFile(const FileSystemURL& url,
|
| base::PLATFORM_FILE_WRITE_ATTRIBUTES)) {
|
| base::PlatformFileError result = SetUp(url, OPERATION_MODE_WRITE);
|
| if (result != base::PLATFORM_FILE_OK) {
|
| - callback.Run(result, base::PlatformFile(), base::ProcessHandle());
|
| + callback.Run(result,
|
| + base::PlatformFile(),
|
| + base::Closure(),
|
| + base::ProcessHandle());
|
| return;
|
| }
|
| } else {
|
| base::PlatformFileError result = SetUp(url, OPERATION_MODE_READ);
|
| if (result != base::PLATFORM_FILE_OK) {
|
| - callback.Run(result, base::PlatformFile(), base::ProcessHandle());
|
| + callback.Run(result,
|
| + base::PlatformFile(),
|
| + base::Closure(),
|
| + base::ProcessHandle());
|
| return;
|
| }
|
| }
|
| @@ -359,6 +371,7 @@ void LocalFileSystemOperation::OpenFile(const FileSystemURL& url,
|
| url, callback, file_flags),
|
| base::Bind(callback, base::PLATFORM_FILE_ERROR_FAILED,
|
| base::kInvalidPlatformFileValue,
|
| + base::Closure(),
|
| base::kNullProcessHandle));
|
| }
|
|
|
| @@ -819,7 +832,9 @@ void LocalFileSystemOperation::DidOpenFile(
|
| bool unused) {
|
| if (rv == base::PLATFORM_FILE_OK)
|
| CHECK_NE(base::kNullProcessHandle, peer_handle_);
|
| - callback.Run(rv, file.ReleaseValue(), peer_handle_);
|
| + callback.Run(rv, file.ReleaseValue(),
|
| + base::Bind(&NopCloseFileCallback),
|
| + peer_handle_);
|
| }
|
|
|
| void LocalFileSystemOperation::DidCreateSnapshotFile(
|
|
|