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

Unified Diff: chrome/browser/media_galleries/fileapi/native_media_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: chrome/browser/media_galleries/fileapi/native_media_file_util.h
diff --git a/chrome/browser/media_galleries/fileapi/native_media_file_util.h b/chrome/browser/media_galleries/fileapi/native_media_file_util.h
index a6c8ddcc68a48be4f6389f448f7853e4036124dc..382bedfa74681b911e1826d021f4c23ddf33cb69 100644
--- a/chrome/browser/media_galleries/fileapi/native_media_file_util.h
+++ b/chrome/browser/media_galleries/fileapi/native_media_file_util.h
@@ -26,8 +26,8 @@ class NativeMediaFileUtil : public fileapi::AsyncFileUtil {
// Uses the MIME sniffer code, which actually looks into the file,
// to determine if it is really a media file (to avoid exposing
// non-media files with a media file extension.)
- static base::PlatformFileError IsMediaFile(const base::FilePath& path);
- static base::PlatformFileError BufferIsMediaHeader(net::IOBuffer* buf,
+ static base::File::Error IsMediaFile(const base::FilePath& path);
+ static base::File::Error BufferIsMediaHeader(net::IOBuffer* buf,
size_t length);
// AsyncFileUtil overrides.
@@ -143,47 +143,47 @@ class NativeMediaFileUtil : public fileapi::AsyncFileUtil {
// The following methods should only be called on the task runner thread.
// Necessary for copy/move to succeed.
- virtual base::PlatformFileError CreateDirectorySync(
+ virtual base::File::Error CreateDirectorySync(
fileapi::FileSystemOperationContext* context,
const fileapi::FileSystemURL& url,
bool exclusive,
bool recursive);
- virtual base::PlatformFileError CopyOrMoveFileSync(
+ virtual base::File::Error CopyOrMoveFileSync(
fileapi::FileSystemOperationContext* context,
const fileapi::FileSystemURL& src_url,
const fileapi::FileSystemURL& dest_url,
CopyOrMoveOption option,
bool copy);
- virtual base::PlatformFileError CopyInForeignFileSync(
+ virtual base::File::Error CopyInForeignFileSync(
fileapi::FileSystemOperationContext* context,
const base::FilePath& src_file_path,
const fileapi::FileSystemURL& dest_url);
- virtual base::PlatformFileError GetFileInfoSync(
+ virtual base::File::Error GetFileInfoSync(
fileapi::FileSystemOperationContext* context,
const fileapi::FileSystemURL& url,
- base::PlatformFileInfo* file_info,
+ base::File::Info* file_info,
base::FilePath* platform_path);
// Called by GetFileInfoSync. Meant to be overridden by subclasses that
// have special mappings from URLs to platform paths (virtual filesystems).
- virtual base::PlatformFileError GetLocalFilePath(
+ virtual base::File::Error GetLocalFilePath(
fileapi::FileSystemOperationContext* context,
const fileapi::FileSystemURL& file_system_url,
base::FilePath* local_file_path);
- virtual base::PlatformFileError ReadDirectorySync(
+ virtual base::File::Error ReadDirectorySync(
fileapi::FileSystemOperationContext* context,
const fileapi::FileSystemURL& url,
EntryList* file_list);
- virtual base::PlatformFileError DeleteFileSync(
+ virtual base::File::Error DeleteFileSync(
fileapi::FileSystemOperationContext* context,
const fileapi::FileSystemURL& url);
// Necessary for move to succeed.
- virtual base::PlatformFileError DeleteDirectorySync(
+ virtual base::File::Error DeleteDirectorySync(
fileapi::FileSystemOperationContext* context,
const fileapi::FileSystemURL& url);
- virtual base::PlatformFileError CreateSnapshotFileSync(
+ virtual base::File::Error CreateSnapshotFileSync(
fileapi::FileSystemOperationContext* context,
const fileapi::FileSystemURL& url,
- base::PlatformFileInfo* file_info,
+ base::File::Info* file_info,
base::FilePath* platform_path,
scoped_refptr<webkit_blob::ShareableFileReference>* file_ref);
@@ -196,7 +196,7 @@ class NativeMediaFileUtil : public fileapi::AsyncFileUtil {
// Like GetLocalFilePath(), but always take media_path_filter() into
// consideration. If the media_path_filter() check fails, return
// PLATFORM_FILE_ERROR_SECURITY. |local_file_path| does not have to exist.
- base::PlatformFileError GetFilteredLocalFilePath(
+ base::File::Error GetFilteredLocalFilePath(
fileapi::FileSystemOperationContext* context,
const fileapi::FileSystemURL& file_system_url,
base::FilePath* local_file_path);
@@ -207,10 +207,10 @@ class NativeMediaFileUtil : public fileapi::AsyncFileUtil {
// consideration.
// If the media_path_filter() check fails, return |failure_error|.
// If |local_file_path| is a directory, return PLATFORM_FILE_OK.
- base::PlatformFileError GetFilteredLocalFilePathForExistingFileOrDirectory(
+ base::File::Error GetFilteredLocalFilePathForExistingFileOrDirectory(
fileapi::FileSystemOperationContext* context,
const fileapi::FileSystemURL& file_system_url,
- base::PlatformFileError failure_error,
+ base::File::Error failure_error,
base::FilePath* local_file_path);

Powered by Google App Engine
This is Rietveld 408576698