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

Unified Diff: webkit/browser/fileapi/file_system_operation_impl.cc

Issue 278113002: Remove PlatformFile from fileapi::AsyncFileUtil (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/browser/fileapi/file_system_operation_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/browser/fileapi/file_system_operation_impl.cc
diff --git a/webkit/browser/fileapi/file_system_operation_impl.cc b/webkit/browser/fileapi/file_system_operation_impl.cc
index 5cee4a1dae085783a3b5058d5d6c0ffe42577619..c6b578b1efa5b37ee593c646e7b5d52164883e02 100644
--- a/webkit/browser/fileapi/file_system_operation_impl.cc
+++ b/webkit/browser/fileapi/file_system_operation_impl.cc
@@ -545,10 +545,19 @@ void FileSystemOperationImpl::DidWrite(
void FileSystemOperationImpl::DidOpenFile(
const OpenFileCallback& callback,
- base::File::Error rv,
- base::PassPlatformFile file,
+ base::File file,
const base::Closure& on_close_callback) {
- callback.Run(rv, file.ReleaseValue(), on_close_callback);
+ // TODO(rvargas): Remove PlatformFile from FileSystemOperation.
+ base::File::Error error;
+ base::PlatformFile platform_file;
+ if (file.IsValid()) {
+ error = base::File::FILE_OK;
+ platform_file = file.TakePlatformFile();
+ } else {
+ error = file.error_details();
+ platform_file = base::kInvalidPlatformFileValue;
+ }
+ callback.Run(error, platform_file, on_close_callback);
}
bool FileSystemOperationImpl::SetPendingOperationType(OperationType type) {
« no previous file with comments | « webkit/browser/fileapi/file_system_operation_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698