diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-08 07:51:39 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-08 07:51:39 +0000 |
commit | 403ada8c6a8e31ecb726517aed9cf320a4b9d26a (patch) | |
tree | 7621b82c9454deb2de6befcb4fd261126ed49d12 /webkit | |
parent | 4749e49e0166f32158bb2ba1ef8f20666379a60b (diff) | |
download | chromium_src-403ada8c6a8e31ecb726517aed9cf320a4b9d26a.zip chromium_src-403ada8c6a8e31ecb726517aed9cf320a4b9d26a.tar.gz chromium_src-403ada8c6a8e31ecb726517aed9cf320a4b9d26a.tar.bz2 |
Cleanup: Remove using statements from webkit/fileapi header files.
Review URL: https://chromiumcodereview.appspot.com/11747020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175498 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
21 files changed, 85 insertions, 123 deletions
diff --git a/webkit/fileapi/file_system_context.cc b/webkit/fileapi/file_system_context.cc index 44142e7..93a0aa7 100644 --- a/webkit/fileapi/file_system_context.cc +++ b/webkit/fileapi/file_system_context.cc @@ -5,7 +5,6 @@ #include "webkit/fileapi/file_system_context.h" #include "base/bind.h" -#include "base/file_util.h" #include "base/stl_util.h" #include "base/single_thread_task_runner.h" #include "googleurl/src/gurl.h" @@ -238,7 +237,7 @@ void FileSystemContext::DeleteFileSystem( } FileSystemOperation* FileSystemContext::CreateFileSystemOperation( - const FileSystemURL& url, PlatformFileError* error_code) { + const FileSystemURL& url, base::PlatformFileError* error_code) { if (!url.is_valid()) { if (error_code) *error_code = base::PLATFORM_FILE_ERROR_INVALID_URL; @@ -252,7 +251,7 @@ FileSystemOperation* FileSystemContext::CreateFileSystemOperation( return NULL; } - PlatformFileError fs_error = base::PLATFORM_FILE_OK; + base::PlatformFileError fs_error = base::PLATFORM_FILE_OK; FileSystemOperation* operation = mount_point_provider->CreateFileSystemOperation(url, this, &fs_error); diff --git a/webkit/fileapi/file_system_dir_url_request_job_unittest.cc b/webkit/fileapi/file_system_dir_url_request_job_unittest.cc index f9dfaad..274ea49 100644 --- a/webkit/fileapi/file_system_dir_url_request_job_unittest.cc +++ b/webkit/fileapi/file_system_dir_url_request_job_unittest.cc @@ -141,9 +141,9 @@ class FileSystemDirURLRequestJobTest : public testing::Test { context.get(), CreateURL(path), length)); } - PlatformFileError GetFileInfo(const FilePath& path, - base::PlatformFileInfo* file_info, - FilePath* platform_file_path) { + base::PlatformFileError GetFileInfo(const FilePath& path, + base::PlatformFileInfo* file_info, + FilePath* platform_file_path) { scoped_ptr<FileSystemOperationContext> context(NewOperationContext()); return file_util()->GetFileInfo(context.get(), CreateURL(path), diff --git a/webkit/fileapi/file_system_file_util.h b/webkit/fileapi/file_system_file_util.h index bab0881..10e7868 100644 --- a/webkit/fileapi/file_system_file_util.h +++ b/webkit/fileapi/file_system_file_util.h @@ -6,8 +6,6 @@ #define WEBKIT_FILEAPI_FILE_SYSTEM_FILE_UTIL_H_ #include "base/file_path.h" -#include "base/file_util_proxy.h" -#include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/platform_file.h" #include "webkit/fileapi/file_system_url.h" @@ -23,8 +21,6 @@ class ShareableFileReference; namespace fileapi { -using base::PlatformFile; -using base::PlatformFileError; class FileSystemOperationContext; // A file utility interface that provides basic file utility methods for @@ -74,17 +70,17 @@ class WEBKIT_STORAGE_EXPORT FileSystemFileUtil { // If PLATFORM_FILE_CREATE is set in |file_flags| it always tries to create // a new file at the given |url| and calls back with // PLATFORM_FILE_ERROR_FILE_EXISTS if the |url| already exists. - virtual PlatformFileError CreateOrOpen( + virtual base::PlatformFileError CreateOrOpen( FileSystemOperationContext* context, const FileSystemURL& url, int file_flags, - PlatformFile* file_handle, + base::PlatformFile* file_handle, bool* created) = 0; // Closes the given file handle. - virtual PlatformFileError Close( + virtual base::PlatformFileError Close( FileSystemOperationContext* context, - PlatformFile file) = 0; + base::PlatformFile file) = 0; // Ensures that the given |url| exist. This creates a empty new file // at |url| if the |url| does not exist. @@ -95,20 +91,20 @@ class WEBKIT_STORAGE_EXPORT FileSystemFileUtil { // is set PLATFORM_FILE_OK. // If the file hasn't existed but it couldn't be created for some other // reasons, |created| is set false and |error code| indicates the error. - virtual PlatformFileError EnsureFileExists( + virtual base::PlatformFileError EnsureFileExists( FileSystemOperationContext* context, const FileSystemURL& url, bool* created) = 0; // Creates directory at given url. It's an error to create // if |exclusive| is true and dir already exists. - virtual PlatformFileError CreateDirectory( + virtual base::PlatformFileError CreateDirectory( FileSystemOperationContext* context, const FileSystemURL& url, bool exclusive, bool recursive) = 0; // Retrieves the information about a file. - virtual PlatformFileError GetFileInfo( + virtual base::PlatformFileError GetFileInfo( FileSystemOperationContext* context, const FileSystemURL& url, base::PlatformFileInfo* file_info, @@ -129,7 +125,7 @@ class WEBKIT_STORAGE_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 PlatformFileError GetLocalFilePath( + virtual base::PlatformFileError GetLocalFilePath( FileSystemOperationContext* context, const FileSystemURL& file_system_url, FilePath* local_file_path) = 0; @@ -137,7 +133,7 @@ class WEBKIT_STORAGE_EXPORT FileSystemFileUtil { // Updates the file metadata information. Unlike posix's touch, it does // not create a file even if |url| does not exist, but instead fails // with PLATFORM_FILE_ERROR_NOT_FOUND. - virtual PlatformFileError Touch( + virtual base::PlatformFileError Touch( FileSystemOperationContext* context, const FileSystemURL& url, const base::Time& last_access_time, @@ -145,7 +141,7 @@ class WEBKIT_STORAGE_EXPORT FileSystemFileUtil { // Truncates a file to the given length. If |length| is greater than the // current length of the file, the file will be extended with zeroes. - virtual PlatformFileError Truncate( + virtual base::PlatformFileError Truncate( FileSystemOperationContext* context, const FileSystemURL& url, int64 length) = 0; @@ -156,27 +152,27 @@ class WEBKIT_STORAGE_EXPORT FileSystemFileUtil { const FileSystemURL& url) = 0; // Copies or moves a single file from |src_url| to |dest_url|. - virtual PlatformFileError CopyOrMoveFile( + virtual base::PlatformFileError CopyOrMoveFile( FileSystemOperationContext* context, const FileSystemURL& src_url, const FileSystemURL& dest_url, bool copy) = 0; // Copies in a single file from a different filesystem. - virtual PlatformFileError CopyInForeignFile( + virtual base::PlatformFileError CopyInForeignFile( FileSystemOperationContext* context, const FilePath& src_file_path, const FileSystemURL& dest_url) = 0; // Deletes a single file. // It assumes the given url points a file. - virtual PlatformFileError DeleteFile( + virtual base::PlatformFileError DeleteFile( FileSystemOperationContext* context, const FileSystemURL& url) = 0; // Deletes a single empty directory. // It assumes the given url points an empty directory. - virtual PlatformFileError DeleteSingleDirectory( + virtual base::PlatformFileError DeleteSingleDirectory( FileSystemOperationContext* context, const FileSystemURL& url) = 0; diff --git a/webkit/fileapi/file_system_file_util_proxy.h b/webkit/fileapi/file_system_file_util_proxy.h index f7beea4..654fbf9 100644 --- a/webkit/fileapi/file_system_file_util_proxy.h +++ b/webkit/fileapi/file_system_file_util_proxy.h @@ -5,23 +5,15 @@ #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_FILE_UTIL_PROXY_H_ #define WEBKIT_FILEAPI_FILE_SYSTEM_FILE_UTIL_PROXY_H_ -#include <vector> - #include "base/callback.h" #include "base/file_path.h" #include "base/file_util_proxy.h" -#include "base/memory/ref_counted.h" #include "base/platform_file.h" -#include "base/tracked_objects.h" #include "webkit/fileapi/file_system_file_util.h" #include "webkit/fileapi/file_system_operation.h" namespace fileapi { -using base::PlatformFile; -using base::PlatformFileError; -using base::PlatformFileInfo; - class FileSystemFileUtil; class FileSystemOperationContext; class FileSystemURL; @@ -36,8 +28,8 @@ class FileSystemFileUtilProxy { typedef base::FileUtilProxy::Entry Entry; typedef base::FileUtilProxy::CreateOrOpenCallback CreateOrOpenCallback; - typedef base::Callback<void(PlatformFileError status)> StatusCallback; - typedef base::Callback<void(PlatformFileError status, + typedef base::Callback<void(base::PlatformFileError status)> StatusCallback; + typedef base::Callback<void(base::PlatformFileError status, bool created)> EnsureFileExistsCallback; typedef FileSystemOperation::GetMetadataCallback GetFileInfoCallback; typedef FileSystemOperation::ReadDirectoryCallback ReadDirectoryCallback; diff --git a/webkit/fileapi/isolated_file_util.cc b/webkit/fileapi/isolated_file_util.cc index 0176d77..cf3f0ce 100644 --- a/webkit/fileapi/isolated_file_util.cc +++ b/webkit/fileapi/isolated_file_util.cc @@ -194,4 +194,4 @@ bool DraggedFileUtil::IsDirectoryEmpty( return NativeFileUtil::IsDirectoryEmpty(url.path()); } -} // namespace +} // namespace fileapi diff --git a/webkit/fileapi/isolated_file_util.h b/webkit/fileapi/isolated_file_util.h index 3a647ef..d6b06e4 100644 --- a/webkit/fileapi/isolated_file_util.h +++ b/webkit/fileapi/isolated_file_util.h @@ -19,7 +19,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE IsolatedFileUtil : public LocalFileUtil { virtual ~IsolatedFileUtil() {} // LocalFileUtil overrides. - virtual PlatformFileError GetLocalFilePath( + virtual base::PlatformFileError GetLocalFilePath( FileSystemOperationContext* context, const FileSystemURL& file_system_url, FilePath* local_file_path) OVERRIDE; diff --git a/webkit/fileapi/isolated_mount_point_provider.h b/webkit/fileapi/isolated_mount_point_provider.h index 659a711..a4788d7 100644 --- a/webkit/fileapi/isolated_mount_point_provider.h +++ b/webkit/fileapi/isolated_mount_point_provider.h @@ -23,9 +23,6 @@ class DeviceMediaFileUtil; class IsolatedMountPointProvider : public FileSystemMountPointProvider { public: - using FileSystemMountPointProvider::ValidateFileSystemCallback; - using FileSystemMountPointProvider::DeleteFileSystemCallback; - explicit IsolatedMountPointProvider(const FilePath& profile_path); virtual ~IsolatedMountPointProvider(); diff --git a/webkit/fileapi/local_file_util.cc b/webkit/fileapi/local_file_util.cc index 58cb991..2e47094 100644 --- a/webkit/fileapi/local_file_util.cc +++ b/webkit/fileapi/local_file_util.cc @@ -16,6 +16,8 @@ namespace fileapi { +using base::PlatformFileError; + class LocalFileEnumerator : public FileSystemFileUtil::AbstractFileEnumerator { public: LocalFileEnumerator(const FilePath& platform_root_path, @@ -79,7 +81,7 @@ LocalFileUtil::~LocalFileUtil() { PlatformFileError LocalFileUtil::CreateOrOpen( FileSystemOperationContext* context, const FileSystemURL& url, int file_flags, - PlatformFile* file_handle, bool* created) { + base::PlatformFile* file_handle, bool* created) { FilePath file_path; PlatformFileError error = GetLocalFilePath(context, url, &file_path); if (error != base::PLATFORM_FILE_OK) @@ -89,7 +91,7 @@ PlatformFileError LocalFileUtil::CreateOrOpen( } PlatformFileError LocalFileUtil::Close(FileSystemOperationContext* context, - PlatformFile file) { + base::PlatformFile file) { return NativeFileUtil::Close(file); } diff --git a/webkit/fileapi/local_file_util.h b/webkit/fileapi/local_file_util.h index b101ddf..f17069f 100644 --- a/webkit/fileapi/local_file_util.h +++ b/webkit/fileapi/local_file_util.h @@ -5,33 +5,21 @@ #ifndef WEBKIT_FILEAPI_LOCAL_FILE_UTIL_H_ #define WEBKIT_FILEAPI_LOCAL_FILE_UTIL_H_ -#include <vector> - -#include "base/callback_forward.h" #include "base/compiler_specific.h" -#include "base/file_path.h" -#include "base/file_util.h" -#include "base/file_util_proxy.h" -#include "base/logging.h" #include "base/memory/scoped_ptr.h" #include "base/platform_file.h" -#include "webkit/blob/shareable_file_reference.h" #include "webkit/fileapi/file_system_file_util.h" -#include "webkit/fileapi/file_system_types.h" #include "webkit/storage/webkit_storage_export.h" namespace base { -struct PlatformFileInfo; class Time; } +class FilePath; class GURL; namespace fileapi { -using base::PlatformFile; -using base::PlatformFileError; - class FileSystemOperationContext; class FileSystemURL; @@ -41,24 +29,24 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE LocalFileUtil : public FileSystemFileUtil { LocalFileUtil(); virtual ~LocalFileUtil(); - virtual PlatformFileError CreateOrOpen( + virtual base::PlatformFileError CreateOrOpen( FileSystemOperationContext* context, const FileSystemURL& url, int file_flags, - PlatformFile* file_handle, + base::PlatformFile* file_handle, bool* created) OVERRIDE; - virtual PlatformFileError Close( + virtual base::PlatformFileError Close( FileSystemOperationContext* context, - PlatformFile file) OVERRIDE; - virtual PlatformFileError EnsureFileExists( + base::PlatformFile file) OVERRIDE; + virtual base::PlatformFileError EnsureFileExists( FileSystemOperationContext* context, const FileSystemURL& url, bool* created) OVERRIDE; - virtual PlatformFileError CreateDirectory( + virtual base::PlatformFileError CreateDirectory( FileSystemOperationContext* context, const FileSystemURL& url, bool exclusive, bool recursive) OVERRIDE; - virtual PlatformFileError GetFileInfo( + virtual base::PlatformFileError GetFileInfo( FileSystemOperationContext* context, const FileSystemURL& url, base::PlatformFileInfo* file_info, @@ -67,38 +55,38 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE LocalFileUtil : public FileSystemFileUtil { FileSystemOperationContext* context, const FileSystemURL& root_url, bool recursive) OVERRIDE; - virtual PlatformFileError GetLocalFilePath( + virtual base::PlatformFileError GetLocalFilePath( FileSystemOperationContext* context, const FileSystemURL& file_system_url, FilePath* local_file_path) OVERRIDE; - virtual PlatformFileError Touch( + virtual base::PlatformFileError Touch( FileSystemOperationContext* context, const FileSystemURL& url, const base::Time& last_access_time, const base::Time& last_modified_time) OVERRIDE; - virtual PlatformFileError Truncate( + virtual base::PlatformFileError Truncate( FileSystemOperationContext* context, const FileSystemURL& url, int64 length) OVERRIDE; virtual bool IsDirectoryEmpty( FileSystemOperationContext* context, const FileSystemURL& url) OVERRIDE; - virtual PlatformFileError CopyOrMoveFile( + virtual base::PlatformFileError CopyOrMoveFile( FileSystemOperationContext* context, const FileSystemURL& src_url, const FileSystemURL& dest_url, bool copy) OVERRIDE; - virtual PlatformFileError CopyInForeignFile( + virtual base::PlatformFileError CopyInForeignFile( FileSystemOperationContext* context, const FilePath& src_file_path, const FileSystemURL& dest_url) OVERRIDE; - virtual PlatformFileError DeleteFile( + virtual base::PlatformFileError DeleteFile( FileSystemOperationContext* context, const FileSystemURL& url) OVERRIDE; - virtual PlatformFileError DeleteSingleDirectory( + virtual base::PlatformFileError DeleteSingleDirectory( FileSystemOperationContext* context, const FileSystemURL& url) OVERRIDE; - virtual PlatformFileError CreateSnapshotFile( + virtual base::PlatformFileError CreateSnapshotFile( FileSystemOperationContext* context, const FileSystemURL& url, base::PlatformFileInfo* file_info, diff --git a/webkit/fileapi/media/device_media_file_util.cc b/webkit/fileapi/media/device_media_file_util.cc index 2422f49..aaf7a97 100644 --- a/webkit/fileapi/media/device_media_file_util.cc +++ b/webkit/fileapi/media/device_media_file_util.cc @@ -13,6 +13,7 @@ #include "webkit/fileapi/media/media_path_filter.h" #include "webkit/fileapi/media/mtp_device_map_service.h" +using base::PlatformFile; using base::PlatformFileError; using base::PlatformFileInfo; diff --git a/webkit/fileapi/media/device_media_file_util.h b/webkit/fileapi/media/device_media_file_util.h index f543c90..4564a88 100644 --- a/webkit/fileapi/media/device_media_file_util.h +++ b/webkit/fileapi/media/device_media_file_util.h @@ -52,7 +52,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE DeviceMediaFileUtil FileSystemOperationContext* context, const FileSystemURL& root_url, bool recursive) OVERRIDE; - virtual PlatformFileError GetLocalFilePath( + virtual base::PlatformFileError GetLocalFilePath( FileSystemOperationContext* context, const FileSystemURL& file_system_url, FilePath* local_file_path) OVERRIDE; diff --git a/webkit/fileapi/media/mtp_device_delegate.h b/webkit/fileapi/media/mtp_device_delegate.h index 9829b73..793f46c 100644 --- a/webkit/fileapi/media/mtp_device_delegate.h +++ b/webkit/fileapi/media/mtp_device_delegate.h @@ -40,7 +40,7 @@ class MTPDeviceDelegate { // Updates the temporary snapshot file contents given by |local_path| with // media file contents given by |device_file_path| and also returns the // metadata of the temporary file. - virtual PlatformFileError CreateSnapshotFile( + virtual base::PlatformFileError CreateSnapshotFile( const FilePath& device_file_path, const FilePath& local_path, base::PlatformFileInfo* file_info) = 0; diff --git a/webkit/fileapi/media/native_media_file_util.cc b/webkit/fileapi/media/native_media_file_util.cc index 12fa3b1..4ccbc34 100644 --- a/webkit/fileapi/media/native_media_file_util.cc +++ b/webkit/fileapi/media/native_media_file_util.cc @@ -4,18 +4,16 @@ #include "webkit/fileapi/media/native_media_file_util.h" -#include "net/base/mime_util.h" #include "webkit/fileapi/file_system_operation_context.h" #include "webkit/fileapi/media/media_path_filter.h" #include "webkit/fileapi/media/filtering_file_enumerator.h" +using base::PlatformFile; using base::PlatformFileError; using base::PlatformFileInfo; namespace fileapi { -class MediaPathFilter; - NativeMediaFileUtil::NativeMediaFileUtil() { } diff --git a/webkit/fileapi/media/native_media_file_util.h b/webkit/fileapi/media/native_media_file_util.h index 431a315..6b86e1d 100644 --- a/webkit/fileapi/media/native_media_file_util.h +++ b/webkit/fileapi/media/native_media_file_util.h @@ -19,44 +19,44 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE NativeMediaFileUtil public: NativeMediaFileUtil(); - virtual PlatformFileError CreateOrOpen( + virtual base::PlatformFileError CreateOrOpen( FileSystemOperationContext* context, const FileSystemURL& url, int file_flags, - PlatformFile* file_handle, + base::PlatformFile* file_handle, bool* created) OVERRIDE; - virtual PlatformFileError EnsureFileExists( + virtual base::PlatformFileError EnsureFileExists( FileSystemOperationContext* context, const FileSystemURL& url, bool* created) OVERRIDE; virtual scoped_ptr<AbstractFileEnumerator> CreateFileEnumerator( FileSystemOperationContext* context, const FileSystemURL& root_url, bool recursive) OVERRIDE; - virtual PlatformFileError Touch( + virtual base::PlatformFileError Touch( FileSystemOperationContext* context, const FileSystemURL& url, const base::Time& last_access_time, const base::Time& last_modified_time) OVERRIDE; - virtual PlatformFileError Truncate( + virtual base::PlatformFileError Truncate( FileSystemOperationContext* context, const FileSystemURL& url, int64 length) OVERRIDE; virtual bool IsDirectoryEmpty( FileSystemOperationContext* context, const FileSystemURL& url) OVERRIDE; - virtual PlatformFileError CopyOrMoveFile( + virtual base::PlatformFileError CopyOrMoveFile( FileSystemOperationContext* context, const FileSystemURL& src_url, const FileSystemURL& dest_url, bool copy) OVERRIDE; - virtual PlatformFileError CopyInForeignFile( + virtual base::PlatformFileError CopyInForeignFile( FileSystemOperationContext* context, const FilePath& src_file_path, const FileSystemURL& dest_url) OVERRIDE; - virtual PlatformFileError DeleteFile( + virtual base::PlatformFileError DeleteFile( FileSystemOperationContext* context, const FileSystemURL& url) OVERRIDE; - virtual PlatformFileError GetFileInfo( + virtual base::PlatformFileError GetFileInfo( FileSystemOperationContext* context, const FileSystemURL& url, base::PlatformFileInfo* file_info, diff --git a/webkit/fileapi/native_file_util.cc b/webkit/fileapi/native_file_util.cc index 934d0b7..c6bc50b 100644 --- a/webkit/fileapi/native_file_util.cc +++ b/webkit/fileapi/native_file_util.cc @@ -4,8 +4,6 @@ #include "webkit/fileapi/native_file_util.h" -#include <vector> - #include "base/file_util.h" #include "base/memory/scoped_ptr.h" #include "webkit/fileapi/file_system_operation_context.h" @@ -35,6 +33,9 @@ bool SetPlatformSpecificDirectoryPermissions(const FilePath& dir_path) { } // namespace +using base::PlatformFile; +using base::PlatformFileError; + class NativeFileEnumerator : public FileSystemFileUtil::AbstractFileEnumerator { public: NativeFileEnumerator(const FilePath& root_path, diff --git a/webkit/fileapi/native_file_util.h b/webkit/fileapi/native_file_util.h index ccf75bd..ff288e5 100644 --- a/webkit/fileapi/native_file_util.h +++ b/webkit/fileapi/native_file_util.h @@ -18,41 +18,38 @@ class Time; namespace fileapi { -using base::PlatformFile; -using base::PlatformFileError; - // TODO(dmikurube): Add unit tests for NativeFileUtil. // This class handles accessing the OS native filesystem. class WEBKIT_STORAGE_EXPORT_PRIVATE NativeFileUtil { public: - static PlatformFileError CreateOrOpen( + static base::PlatformFileError CreateOrOpen( const FilePath& path, int file_flags, - PlatformFile* file_handle, + base::PlatformFile* file_handle, bool* created); - static PlatformFileError Close(PlatformFile file); - static PlatformFileError EnsureFileExists(const FilePath& path, - bool* created); - static PlatformFileError CreateDirectory(const FilePath& path, - bool exclusive, - bool recursive); - static PlatformFileError GetFileInfo(const FilePath& path, - base::PlatformFileInfo* file_info); + static base::PlatformFileError Close(base::PlatformFile file); + static base::PlatformFileError EnsureFileExists(const FilePath& path, + bool* created); + static base::PlatformFileError CreateDirectory(const FilePath& path, + bool exclusive, + bool recursive); + static base::PlatformFileError GetFileInfo(const FilePath& path, + base::PlatformFileInfo* file_info); static scoped_ptr<FileSystemFileUtil::AbstractFileEnumerator> CreateFileEnumerator(const FilePath& root_path, bool recursive); - static PlatformFileError Touch(const FilePath& path, - const base::Time& last_access_time, - const base::Time& last_modified_time); - static PlatformFileError Truncate(const FilePath& path, int64 length); + static base::PlatformFileError Touch(const FilePath& path, + const base::Time& last_access_time, + const base::Time& last_modified_time); + static base::PlatformFileError Truncate(const FilePath& path, int64 length); static bool PathExists(const FilePath& path); static bool DirectoryExists(const FilePath& path); static bool IsDirectoryEmpty(const FilePath& path); - static PlatformFileError CopyOrMoveFile(const FilePath& src_path, - const FilePath& dest_path, - bool copy); - static PlatformFileError DeleteFile(const FilePath& path); - static PlatformFileError DeleteSingleDirectory(const FilePath& path); + static base::PlatformFileError CopyOrMoveFile(const FilePath& src_path, + const FilePath& dest_path, + bool copy); + static base::PlatformFileError DeleteFile(const FilePath& path); + static base::PlatformFileError DeleteSingleDirectory(const FilePath& path); private: DISALLOW_IMPLICIT_CONSTRUCTORS(NativeFileUtil); diff --git a/webkit/fileapi/obfuscated_file_util.cc b/webkit/fileapi/obfuscated_file_util.cc index 3144636..09ed25c 100644 --- a/webkit/fileapi/obfuscated_file_util.cc +++ b/webkit/fileapi/obfuscated_file_util.cc @@ -12,7 +12,6 @@ #include "base/format_macros.h" #include "base/logging.h" #include "base/message_loop.h" -#include "base/metrics/histogram.h" #include "base/stl_util.h" #include "base/string_number_conversions.h" #include "base/stringprintf.h" @@ -960,7 +959,6 @@ bool ObfuscatedFileUtil::DeleteDirectoryForOriginAndType( // At this point we are sure we had successfully deleted the origin/type // directory (i.e. we're ready to just return true). - // See if we have other directories in this origin directory. std::vector<FileSystemType> other_types; if (type != kFileSystemTypeTemporary) diff --git a/webkit/fileapi/obfuscated_file_util.h b/webkit/fileapi/obfuscated_file_util.h index 80a1234..039936a 100644 --- a/webkit/fileapi/obfuscated_file_util.h +++ b/webkit/fileapi/obfuscated_file_util.h @@ -7,7 +7,6 @@ #include <map> #include <string> -#include <vector> #include "base/file_path.h" #include "base/file_util_proxy.h" @@ -23,7 +22,6 @@ #include "webkit/storage/webkit_storage_export.h" namespace base { -struct PlatformFileInfo; class Time; } @@ -67,9 +65,9 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE ObfuscatedFileUtil int file_flags, base::PlatformFile* file_handle, bool* created) OVERRIDE; - virtual PlatformFileError Close( + virtual base::PlatformFileError Close( FileSystemOperationContext* context, - PlatformFile file) OVERRIDE; + base::PlatformFile file) OVERRIDE; virtual base::PlatformFileError EnsureFileExists( FileSystemOperationContext* context, const FileSystemURL& url, bool* created) OVERRIDE; @@ -108,7 +106,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE ObfuscatedFileUtil const FileSystemURL& src_url, const FileSystemURL& dest_url, bool copy) OVERRIDE; - virtual PlatformFileError CopyInForeignFile( + virtual base::PlatformFileError CopyInForeignFile( FileSystemOperationContext* context, const FilePath& src_file_path, const FileSystemURL& dest_url) OVERRIDE; diff --git a/webkit/fileapi/obfuscated_file_util_unittest.cc b/webkit/fileapi/obfuscated_file_util_unittest.cc index c0d3e4e..82c9958 100644 --- a/webkit/fileapi/obfuscated_file_util_unittest.cc +++ b/webkit/fileapi/obfuscated_file_util_unittest.cc @@ -4,6 +4,7 @@ #include <set> #include <string> +#include <vector> #include "base/bind.h" #include "base/file_path.h" @@ -264,7 +265,7 @@ class ObfuscatedFileUtilTest : public testing::Test { } void CheckFileAndCloseHandle( - const FileSystemURL& url, PlatformFile file_handle) { + const FileSystemURL& url, base::PlatformFile file_handle) { scoped_ptr<FileSystemOperationContext> context(NewContext(NULL)); FilePath local_path; EXPECT_EQ(base::PLATFORM_FILE_OK, ofu()->GetLocalFilePath( @@ -283,7 +284,7 @@ class ObfuscatedFileUtilTest : public testing::Test { if (base::kInvalidPlatformFileValue == file_handle) { bool created = true; - PlatformFileError error; + base::PlatformFileError error; file_handle = base::CreatePlatformFile( data_path, base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_WRITE, @@ -1699,7 +1700,7 @@ TEST_F(ObfuscatedFileUtilTest, TestDirectoryTimestampForCreation) { // CreateOrOpen, create case. url = dir_url.WithPath(dir_url.path().AppendASCII("CreateOrOpen_file")); - PlatformFile file_handle = base::kInvalidPlatformFileValue; + base::PlatformFile file_handle = base::kInvalidPlatformFileValue; created = false; ClearTimestamp(dir_url); context.reset(NewContext(NULL)); diff --git a/webkit/fileapi/sandbox_mount_point_provider.h b/webkit/fileapi/sandbox_mount_point_provider.h index 5082a19..3d5dd11 100644 --- a/webkit/fileapi/sandbox_mount_point_provider.h +++ b/webkit/fileapi/sandbox_mount_point_provider.h @@ -44,9 +44,6 @@ class WEBKIT_STORAGE_EXPORT SandboxMountPointProvider : public FileSystemMountPointProvider, public FileSystemQuotaUtil { public: - using FileSystemMountPointProvider::ValidateFileSystemCallback; - using FileSystemMountPointProvider::DeleteFileSystemCallback; - // Origin enumerator interface. // An instance of this interface is assumed to be called on the file thread. class OriginEnumerator { diff --git a/webkit/fileapi/test_mount_point_provider.h b/webkit/fileapi/test_mount_point_provider.h index 04ebef0..dce922f 100644 --- a/webkit/fileapi/test_mount_point_provider.h +++ b/webkit/fileapi/test_mount_point_provider.h @@ -27,9 +27,6 @@ class FileSystemQuotaUtil; class WEBKIT_STORAGE_EXPORT_PRIVATE TestMountPointProvider : public FileSystemMountPointProvider { public: - using FileSystemMountPointProvider::ValidateFileSystemCallback; - using FileSystemMountPointProvider::DeleteFileSystemCallback; - TestMountPointProvider( base::SequencedTaskRunner* task_runner, const FilePath& base_path); |