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) { |