| Index: webkit/fileapi/local_file_util.cc
|
| diff --git a/webkit/fileapi/local_file_system_file_util.cc b/webkit/fileapi/local_file_util.cc
|
| similarity index 81%
|
| rename from webkit/fileapi/local_file_system_file_util.cc
|
| rename to webkit/fileapi/local_file_util.cc
|
| index ca028e42cb11499d7c46fb51d58a6e2e0e80d610..c5314bc6d23b12999c21efaccf0cce4560bfba2c 100644
|
| --- a/webkit/fileapi/local_file_system_file_util.cc
|
| +++ b/webkit/fileapi/local_file_util.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "webkit/fileapi/local_file_system_file_util.h"
|
| +#include "webkit/fileapi/local_file_util.h"
|
|
|
| #include "base/file_util_proxy.h"
|
| #include "googleurl/src/gurl.h"
|
| @@ -14,15 +14,14 @@
|
|
|
| namespace fileapi {
|
|
|
| -LocalFileSystemFileUtil::LocalFileSystemFileUtil(
|
| - FileSystemFileUtil* underlying_file_util)
|
| - : underlying_file_util_(underlying_file_util) {
|
| +LocalFileUtil::LocalFileUtil(FileApiFileUtil* underlying_file_util)
|
| + : FileApiFileUtil(underlying_file_util) {
|
| }
|
|
|
| -LocalFileSystemFileUtil::~LocalFileSystemFileUtil() {
|
| +LocalFileUtil::~LocalFileUtil() {
|
| }
|
|
|
| -PlatformFileError LocalFileSystemFileUtil::CreateOrOpen(
|
| +PlatformFileError LocalFileUtil::CreateOrOpen(
|
| FileSystemOperationContext* context,
|
| const FilePath& file_path, int file_flags,
|
| PlatformFile* file_handle, bool* created) {
|
| @@ -31,11 +30,11 @@ PlatformFileError LocalFileSystemFileUtil::CreateOrOpen(
|
| file_path);
|
| if (local_path.empty())
|
| return base::PLATFORM_FILE_ERROR_INVALID_OPERATION;
|
| - return underlying_file_util_->CreateOrOpen(
|
| + return underlying_file_util()->CreateOrOpen(
|
| context, local_path, file_flags, file_handle, created);
|
| }
|
|
|
| -PlatformFileError LocalFileSystemFileUtil::EnsureFileExists(
|
| +PlatformFileError LocalFileUtil::EnsureFileExists(
|
| FileSystemOperationContext* context,
|
| const FilePath& file_path,
|
| bool* created) {
|
| @@ -44,11 +43,11 @@ PlatformFileError LocalFileSystemFileUtil::EnsureFileExists(
|
| file_path);
|
| if (local_path.empty())
|
| return base::PLATFORM_FILE_ERROR_INVALID_OPERATION;
|
| - return underlying_file_util_->EnsureFileExists(
|
| + return underlying_file_util()->EnsureFileExists(
|
| context, local_path, created);
|
| }
|
|
|
| -PlatformFileError LocalFileSystemFileUtil::GetLocalFilePath(
|
| +PlatformFileError LocalFileUtil::GetLocalFilePath(
|
| FileSystemOperationContext* context,
|
| const FilePath& virtual_path,
|
| FilePath* local_path) {
|
| @@ -62,7 +61,7 @@ PlatformFileError LocalFileSystemFileUtil::GetLocalFilePath(
|
| return base::PLATFORM_FILE_OK;
|
| }
|
|
|
| -PlatformFileError LocalFileSystemFileUtil::GetFileInfo(
|
| +PlatformFileError LocalFileUtil::GetFileInfo(
|
| FileSystemOperationContext* context,
|
| const FilePath& file_path,
|
| base::PlatformFileInfo* file_info,
|
| @@ -72,11 +71,11 @@ PlatformFileError LocalFileSystemFileUtil::GetFileInfo(
|
| file_path);
|
| if (local_path.empty())
|
| return base::PLATFORM_FILE_ERROR_INVALID_OPERATION;
|
| - return underlying_file_util_->GetFileInfo(
|
| + return underlying_file_util()->GetFileInfo(
|
| context, local_path, file_info, platform_file_path);
|
| }
|
|
|
| -PlatformFileError LocalFileSystemFileUtil::ReadDirectory(
|
| +PlatformFileError LocalFileUtil::ReadDirectory(
|
| FileSystemOperationContext* context,
|
| const FilePath& file_path,
|
| std::vector<base::FileUtilProxy::Entry>* entries) {
|
| @@ -86,11 +85,11 @@ PlatformFileError LocalFileSystemFileUtil::ReadDirectory(
|
| file_path);
|
| if (local_path.empty())
|
| return base::PLATFORM_FILE_ERROR_INVALID_OPERATION;
|
| - return underlying_file_util_->ReadDirectory(
|
| + return underlying_file_util()->ReadDirectory(
|
| context, local_path, entries);
|
| }
|
|
|
| -PlatformFileError LocalFileSystemFileUtil::CreateDirectory(
|
| +PlatformFileError LocalFileUtil::CreateDirectory(
|
| FileSystemOperationContext* context,
|
| const FilePath& file_path,
|
| bool exclusive,
|
| @@ -100,11 +99,11 @@ PlatformFileError LocalFileSystemFileUtil::CreateDirectory(
|
| file_path);
|
| if (local_path.empty())
|
| return base::PLATFORM_FILE_ERROR_INVALID_OPERATION;
|
| - return underlying_file_util_->CreateDirectory(
|
| + return underlying_file_util()->CreateDirectory(
|
| context, local_path, exclusive, recursive);
|
| }
|
|
|
| -PlatformFileError LocalFileSystemFileUtil::CopyOrMoveFile(
|
| +PlatformFileError LocalFileUtil::CopyOrMoveFile(
|
| FileSystemOperationContext* context,
|
| const FilePath& src_file_path,
|
| const FilePath& dest_file_path,
|
| @@ -120,12 +119,12 @@ PlatformFileError LocalFileSystemFileUtil::CopyOrMoveFile(
|
| dest_file_path);
|
| if (local_dest_path.empty())
|
| return base::PLATFORM_FILE_ERROR_INVALID_OPERATION;
|
| - return underlying_file_util_->CopyOrMoveFile(
|
| + return underlying_file_util()->CopyOrMoveFile(
|
| context, local_src_path, local_dest_path, copy);
|
| }
|
|
|
| // TODO(dmikurube): Make it independent from CopyOrMoveFile.
|
| -PlatformFileError LocalFileSystemFileUtil::CopyInForeignFile(
|
| +PlatformFileError LocalFileUtil::CopyInForeignFile(
|
| FileSystemOperationContext* context,
|
| const FilePath& src_file_path,
|
| const FilePath& dest_file_path) {
|
| @@ -136,11 +135,11 @@ PlatformFileError LocalFileSystemFileUtil::CopyInForeignFile(
|
| dest_file_path);
|
| if (local_dest_path.empty())
|
| return base::PLATFORM_FILE_ERROR_INVALID_OPERATION;
|
| - return underlying_file_util_->CopyOrMoveFile(
|
| + return underlying_file_util()->CopyOrMoveFile(
|
| context, src_file_path, local_dest_path, true);
|
| }
|
|
|
| -PlatformFileError LocalFileSystemFileUtil::DeleteFile(
|
| +PlatformFileError LocalFileUtil::DeleteFile(
|
| FileSystemOperationContext* context,
|
| const FilePath& file_path) {
|
| FilePath local_path =
|
| @@ -148,11 +147,11 @@ PlatformFileError LocalFileSystemFileUtil::DeleteFile(
|
| file_path);
|
| if (local_path.empty())
|
| return base::PLATFORM_FILE_ERROR_INVALID_OPERATION;
|
| - return underlying_file_util_->DeleteFile(
|
| + return underlying_file_util()->DeleteFile(
|
| context, local_path);
|
| }
|
|
|
| -PlatformFileError LocalFileSystemFileUtil::DeleteSingleDirectory(
|
| +PlatformFileError LocalFileUtil::DeleteSingleDirectory(
|
| FileSystemOperationContext* context,
|
| const FilePath& file_path) {
|
| FilePath local_path =
|
| @@ -160,11 +159,11 @@ PlatformFileError LocalFileSystemFileUtil::DeleteSingleDirectory(
|
| file_path);
|
| if (local_path.empty())
|
| return base::PLATFORM_FILE_ERROR_INVALID_OPERATION;
|
| - return underlying_file_util_->DeleteSingleDirectory(
|
| + return underlying_file_util()->DeleteSingleDirectory(
|
| context, local_path);
|
| }
|
|
|
| -PlatformFileError LocalFileSystemFileUtil::Touch(
|
| +PlatformFileError LocalFileUtil::Touch(
|
| FileSystemOperationContext* context,
|
| const FilePath& file_path,
|
| const base::Time& last_access_time,
|
| @@ -174,11 +173,11 @@ PlatformFileError LocalFileSystemFileUtil::Touch(
|
| file_path);
|
| if (local_path.empty())
|
| return base::PLATFORM_FILE_ERROR_INVALID_OPERATION;
|
| - return underlying_file_util_->Touch(
|
| + return underlying_file_util()->Touch(
|
| context, local_path, last_access_time, last_modified_time);
|
| }
|
|
|
| -PlatformFileError LocalFileSystemFileUtil::Truncate(
|
| +PlatformFileError LocalFileUtil::Truncate(
|
| FileSystemOperationContext* context,
|
| const FilePath& file_path,
|
| int64 length) {
|
| @@ -187,11 +186,11 @@ PlatformFileError LocalFileSystemFileUtil::Truncate(
|
| file_path);
|
| if (local_path.empty())
|
| return base::PLATFORM_FILE_ERROR_INVALID_OPERATION;
|
| - return underlying_file_util_->Truncate(
|
| + return underlying_file_util()->Truncate(
|
| context, local_path, length);
|
| }
|
|
|
| -bool LocalFileSystemFileUtil::PathExists(
|
| +bool LocalFileUtil::PathExists(
|
| FileSystemOperationContext* context,
|
| const FilePath& file_path) {
|
| FilePath local_path =
|
| @@ -199,11 +198,11 @@ bool LocalFileSystemFileUtil::PathExists(
|
| file_path);
|
| if (local_path.empty())
|
| return false;
|
| - return underlying_file_util_->PathExists(
|
| + return underlying_file_util()->PathExists(
|
| context, local_path);
|
| }
|
|
|
| -bool LocalFileSystemFileUtil::DirectoryExists(
|
| +bool LocalFileUtil::DirectoryExists(
|
| FileSystemOperationContext* context,
|
| const FilePath& file_path) {
|
| FilePath local_path =
|
| @@ -211,11 +210,11 @@ bool LocalFileSystemFileUtil::DirectoryExists(
|
| file_path);
|
| if (local_path.empty())
|
| return false;
|
| - return underlying_file_util_->DirectoryExists(
|
| + return underlying_file_util()->DirectoryExists(
|
| context, local_path);
|
| }
|
|
|
| -bool LocalFileSystemFileUtil::IsDirectoryEmpty(
|
| +bool LocalFileUtil::IsDirectoryEmpty(
|
| FileSystemOperationContext* context,
|
| const FilePath& file_path) {
|
| FilePath local_path =
|
| @@ -223,12 +222,12 @@ bool LocalFileSystemFileUtil::IsDirectoryEmpty(
|
| file_path);
|
| if (local_path.empty())
|
| return true;
|
| - return underlying_file_util_->IsDirectoryEmpty(
|
| + return underlying_file_util()->IsDirectoryEmpty(
|
| context, local_path);
|
| }
|
|
|
| class LocalFileSystemFileEnumerator
|
| - : public FileSystemFileUtil::AbstractFileEnumerator {
|
| + : public FileApiFileUtil::AbstractFileEnumerator {
|
| public:
|
| LocalFileSystemFileEnumerator(const FilePath& platform_root_path,
|
| const FilePath& virtual_root_path,
|
| @@ -266,8 +265,7 @@ bool LocalFileSystemFileEnumerator::IsDirectory() {
|
| return file_util::FileEnumerator::IsDirectory(file_util_info);
|
| }
|
|
|
| -FileSystemFileUtil::AbstractFileEnumerator*
|
| -LocalFileSystemFileUtil::CreateFileEnumerator(
|
| +FileApiFileUtil::AbstractFileEnumerator* LocalFileUtil::CreateFileEnumerator(
|
| FileSystemOperationContext* context,
|
| const FilePath& root_path) {
|
| FilePath local_path =
|
| @@ -282,7 +280,7 @@ LocalFileSystemFileUtil::CreateFileEnumerator(
|
| file_util::FileEnumerator::DIRECTORIES));
|
| }
|
|
|
| -FilePath LocalFileSystemFileUtil::GetLocalPath(
|
| +FilePath LocalFileUtil::GetLocalPath(
|
| FileSystemOperationContext* context,
|
| const GURL& origin_url,
|
| FileSystemType type,
|
|
|