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

Unified Diff: webkit/fileapi/local_file_system_operation.cc

Issue 14472008: [FileAPI] Add file open ID and close callback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 8 months 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 | « webkit/fileapi/file_system_operation.h ('k') | webkit/fileapi/remote_file_system_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 76b1a94c3911a754f2bc6fedbb047b5b79733b9e..5fb8e94aed123f78ef49d54ca5ba8953869e3ff3 100644
--- a/webkit/fileapi/local_file_system_operation.cc
+++ b/webkit/fileapi/local_file_system_operation.cc
@@ -33,6 +33,10 @@ using webkit_blob::ShareableFileReference;
namespace fileapi {
+namespace {
+void NopCloseFileCallback() {}
+}
+
LocalFileSystemOperation::LocalFileSystemOperation(
FileSystemContext* file_system_context,
scoped_ptr<FileSystemOperationContext> operation_context)
@@ -333,6 +337,7 @@ void LocalFileSystemOperation::OpenFile(const FileSystemURL& url,
base::PLATFORM_FILE_HIDDEN))) {
callback.Run(base::PLATFORM_FILE_ERROR_FAILED,
base::kInvalidPlatformFileValue,
+ base::Closure(),
base::kNullProcessHandle);
return;
}
@@ -346,6 +351,7 @@ void LocalFileSystemOperation::OpenFile(const FileSystemURL& url,
if (result != base::PLATFORM_FILE_OK) {
callback.Run(result,
base::kInvalidPlatformFileValue,
+ base::Closure(),
base::kNullProcessHandle);
return;
}
@@ -354,6 +360,7 @@ void LocalFileSystemOperation::OpenFile(const FileSystemURL& url,
if (result != base::PLATFORM_FILE_OK) {
callback.Run(result,
base::kInvalidPlatformFileValue,
+ base::Closure(),
base::kNullProcessHandle);
return;
}
@@ -365,6 +372,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));
}
@@ -825,7 +833,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(
« no previous file with comments | « webkit/fileapi/file_system_operation.h ('k') | webkit/fileapi/remote_file_system_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698