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

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: 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..0f020dc47d88030566e1fb41f12e72f4dc9a3496 100644
--- a/webkit/browser/fileapi/local_file_util.cc
+++ b/webkit/browser/fileapi/local_file_util.cc
@@ -89,13 +89,21 @@ 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;
+ error = NativeFileUtil::CreateOrOpen(file_path, file_flags, &file);
+ if (error != base::File::FILE_OK)
+ return error;
+
+ *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