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

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

Issue 206783004: Remove PlatforFile from fileapi/native_file_util (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change API to return File Created 6 years, 9 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/local_file_util.cc
diff --git a/webkit/browser/fileapi/local_file_util.cc b/webkit/browser/fileapi/local_file_util.cc
index 032244f2b3c1f771f2d4c3c3377414571a60e1f2..90d45e3f0b1f8718408cc331d5ee8f2e49876f1b 100644
--- a/webkit/browser/fileapi/local_file_util.cc
+++ b/webkit/browser/fileapi/local_file_util.cc
@@ -89,13 +89,20 @@ base::File::Error LocalFileUtil::CreateOrOpen(
if (base::IsLink(file_path))
return base::File::FILE_ERROR_NOT_FOUND;
- return NativeFileUtil::CreateOrOpen(file_path, file_flags, file_handle,
- created);
+ // TODO(rvargas): make FileSystemFileUtil use base::File.
+ base::File file = NativeFileUtil::CreateOrOpen(file_path, file_flags);
+ if (!file.IsValid())
+ return file.error_details();
+
+ *created = file.created();
+ *file_handle = file.TakePlatformFile();
+ return base::File::FILE_OK;
}
base::File::Error LocalFileUtil::Close(FileSystemOperationContext* context,
base::PlatformFile file) {
- return NativeFileUtil::Close(file);
+ base::File auto_closed(file);
+ return base::File::FILE_OK;
}
base::File::Error LocalFileUtil::EnsureFileExists(

Powered by Google App Engine
This is Rietveld 408576698