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

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

Issue 291513003: Remove PlatformFile from fileapi::FileSystemOperation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix recent bot failures 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
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 c6b578b1efa5b37ee593c646e7b5d52164883e02..0f6728cbb5b821576e3cca99cf84a9297bd80978 100644
--- a/webkit/browser/fileapi/file_system_operation_impl.cc
+++ b/webkit/browser/fileapi/file_system_operation_impl.cc
@@ -203,9 +203,8 @@ void FileSystemOperationImpl::OpenFile(const FileSystemURL& url,
DCHECK(SetPendingOperationType(kOperationOpenFile));
if (file_flags &
- (base::PLATFORM_FILE_TEMPORARY | base::PLATFORM_FILE_HIDDEN)) {
- callback.Run(base::File::FILE_ERROR_FAILED,
- base::kInvalidPlatformFileValue,
+ (base::File::FLAG_TEMPORARY | base::File::FLAG_HIDDEN)) {
+ callback.Run(base::File(base::File::FILE_ERROR_FAILED),
base::Closure());
return;
}
@@ -214,8 +213,7 @@ void FileSystemOperationImpl::OpenFile(const FileSystemURL& url,
base::Bind(&FileSystemOperationImpl::DoOpenFile,
weak_factory_.GetWeakPtr(),
url, callback, file_flags),
- base::Bind(callback, base::File::FILE_ERROR_FAILED,
- base::kInvalidPlatformFileValue,
+ base::Bind(callback, Passed(base::File(base::File::FILE_ERROR_FAILED)),
base::Closure()));
}
@@ -547,17 +545,7 @@ void FileSystemOperationImpl::DidOpenFile(
const OpenFileCallback& callback,
base::File file,
const base::Closure& 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);
+ callback.Run(file.Pass(), on_close_callback);
}
bool FileSystemOperationImpl::SetPendingOperationType(OperationType type) {
« no previous file with comments | « webkit/browser/fileapi/file_system_operation.h ('k') | webkit/browser/fileapi/file_system_operation_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698