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

Unified Diff: webkit/browser/fileapi/file_system_file_util.h

Issue 145303002: Convert Media Galleries to use base::File (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 11 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_file_util.h
diff --git a/webkit/browser/fileapi/file_system_file_util.h b/webkit/browser/fileapi/file_system_file_util.h
index 5a4d730b5c8beee0c6c712b6adbee4fea19341b0..a9ee03544c001331caa276940869e68a0957a11b 100644
--- a/webkit/browser/fileapi/file_system_file_util.h
+++ b/webkit/browser/fileapi/file_system_file_util.h
@@ -5,6 +5,7 @@
#ifndef WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_FILE_UTIL_H_
#define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_FILE_UTIL_H_
+#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/memory/scoped_ptr.h"
#include "base/platform_file.h"
@@ -60,7 +61,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemFileUtil {
// Creates or opens a file with the given flags.
// See header comments for AsyncFileUtil::CreateOrOpen() for more details.
// This is used only by Pepper/NaCl File API.
- virtual base::PlatformFileError CreateOrOpen(
+ virtual base::File::Error CreateOrOpen(
FileSystemOperationContext* context,
const FileSystemURL& url,
int file_flags,
@@ -69,20 +70,20 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemFileUtil {
// Closes the given file handle.
// This is used only for Pepper/NaCl File API.
- virtual base::PlatformFileError Close(
+ virtual base::File::Error Close(
FileSystemOperationContext* context,
base::PlatformFile file) = 0;
// Ensures that the given |url| exist. This creates a empty new file
// at |url| if the |url| does not exist.
// See header comments for AsyncFileUtil::EnsureFileExists() for more details.
- virtual base::PlatformFileError EnsureFileExists(
+ virtual base::File::Error EnsureFileExists(
FileSystemOperationContext* context,
const FileSystemURL& url, bool* created) = 0;
// Creates directory at given url.
// See header comments for AsyncFileUtil::CreateDirectory() for more details.
- virtual base::PlatformFileError CreateDirectory(
+ virtual base::File::Error CreateDirectory(
FileSystemOperationContext* context,
const FileSystemURL& url,
bool exclusive,
@@ -90,10 +91,10 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemFileUtil {
// Retrieves the information about a file.
// See header comments for AsyncFileUtil::GetFileInfo() for more details.
- virtual base::PlatformFileError GetFileInfo(
+ virtual base::File::Error GetFileInfo(
FileSystemOperationContext* context,
const FileSystemURL& url,
- base::PlatformFileInfo* file_info,
+ base::File::Info* file_info,
base::FilePath* platform_path) = 0;
// Returns a pointer to a new instance of AbstractFileEnumerator which is
@@ -110,14 +111,14 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemFileUtil {
// Maps |file_system_url| given |context| into |local_file_path|
// which represents physical file location on the host OS.
// This may not always make sense for all subclasses.
- virtual base::PlatformFileError GetLocalFilePath(
+ virtual base::File::Error GetLocalFilePath(
FileSystemOperationContext* context,
const FileSystemURL& file_system_url,
base::FilePath* local_file_path) = 0;
// Updates the file metadata information.
// See header comments for AsyncFileUtil::Touch() for more details.
- virtual base::PlatformFileError Touch(
+ virtual base::File::Error Touch(
FileSystemOperationContext* context,
const FileSystemURL& url,
const base::Time& last_access_time,
@@ -125,7 +126,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemFileUtil {
// Truncates a file to the given length.
// See header comments for AsyncFileUtil::Truncate() for more details.
- virtual base::PlatformFileError Truncate(
+ virtual base::File::Error Truncate(
FileSystemOperationContext* context,
const FileSystemURL& url,
int64 length) = 0;
@@ -143,7 +144,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemFileUtil {
// - PLATFORM_FILE_ERROR_FAILED if |dest_url| does not exist and
// its parent path is a file.
//
- virtual base::PlatformFileError CopyOrMoveFile(
+ virtual base::File::Error CopyOrMoveFile(
FileSystemOperationContext* context,
const FileSystemURL& src_url,
const FileSystemURL& dest_url,
@@ -153,20 +154,20 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemFileUtil {
// Copies in a single file from a different filesystem.
// See header comments for AsyncFileUtil::CopyInForeignFile() for
// more details.
- virtual base::PlatformFileError CopyInForeignFile(
+ virtual base::File::Error CopyInForeignFile(
FileSystemOperationContext* context,
const base::FilePath& src_file_path,
const FileSystemURL& dest_url) = 0;
// Deletes a single file.
// See header comments for AsyncFileUtil::DeleteFile() for more details.
- virtual base::PlatformFileError DeleteFile(
+ virtual base::File::Error DeleteFile(
FileSystemOperationContext* context,
const FileSystemURL& url) = 0;
// Deletes a single empty directory.
// See header comments for AsyncFileUtil::DeleteDirectory() for more details.
- virtual base::PlatformFileError DeleteDirectory(
+ virtual base::File::Error DeleteDirectory(
FileSystemOperationContext* context,
const FileSystemURL& url) = 0;
@@ -178,8 +179,8 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemFileUtil {
virtual webkit_blob::ScopedFile CreateSnapshotFile(
FileSystemOperationContext* context,
const FileSystemURL& url,
- base::PlatformFileError* error,
- base::PlatformFileInfo* file_info,
+ base::File::Error* error,
+ base::File::Info* file_info,
base::FilePath* platform_path) = 0;
protected:
« no previous file with comments | « webkit/browser/fileapi/file_system_file_stream_reader.cc ('k') | webkit/browser/fileapi/file_system_operation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698