| Index: webkit/fileapi/quota_file_util.cc
|
| diff --git a/webkit/fileapi/quota_file_util.cc b/webkit/fileapi/quota_file_util.cc
|
| index 56fbcb7a033a36033272be0f926f39e295b4af04..eeefb1370389343252670794b605bdba68ee4807 100644
|
| --- a/webkit/fileapi/quota_file_util.cc
|
| +++ b/webkit/fileapi/quota_file_util.cc
|
| @@ -10,6 +10,7 @@
|
| #include "webkit/fileapi/file_system_operation_context.h"
|
| #include "webkit/fileapi/file_system_path_manager.h"
|
| #include "webkit/fileapi/file_system_quota_util.h"
|
| +#include "webkit/fileapi/native_file_util.h"
|
| #include "webkit/quota/quota_manager.h"
|
|
|
| using quota::QuotaManagerProxy;
|
| @@ -70,8 +71,8 @@ class ScopedOriginUpdateHelper {
|
|
|
| } // namespace (anonymous)
|
|
|
| -QuotaFileUtil::QuotaFileUtil(FileSystemFileUtil* underlying_file_util)
|
| - : underlying_file_util_(underlying_file_util) {
|
| +QuotaFileUtil::QuotaFileUtil(FileApiFileUtil* underlying_file_util)
|
| + : FileApiFileUtil(underlying_file_util) {
|
| }
|
|
|
| QuotaFileUtil::~QuotaFileUtil() {
|
| @@ -79,7 +80,7 @@ QuotaFileUtil::~QuotaFileUtil() {
|
|
|
| // static
|
| QuotaFileUtil* QuotaFileUtil::CreateDefault() {
|
| - return new QuotaFileUtil(new FileSystemFileUtil());
|
| + return new QuotaFileUtil(new NativeFileUtil());
|
| }
|
|
|
| int64 QuotaFileUtil::ComputeFilePathCost(const FilePath& file_path) const {
|
| @@ -110,7 +111,7 @@ PlatformFileError QuotaFileUtil::CreateOrOpen(
|
| return base::PLATFORM_FILE_ERROR_NO_SPACE;
|
| }
|
|
|
| - base::PlatformFileError error = underlying_file_util_->CreateOrOpen(
|
| + base::PlatformFileError error = underlying_file_util()->CreateOrOpen(
|
| fs_context, file_path, file_flags, file_handle, created);
|
|
|
| if (growth > 0) {
|
| @@ -144,7 +145,7 @@ PlatformFileError QuotaFileUtil::EnsureFileExists(
|
| return base::PLATFORM_FILE_ERROR_NO_SPACE;
|
| }
|
|
|
| - base::PlatformFileError error = underlying_file_util_->EnsureFileExists(
|
| + base::PlatformFileError error = underlying_file_util()->EnsureFileExists(
|
| fs_context, file_path, created);
|
|
|
| if (growth > 0 &&error == base::PLATFORM_FILE_OK)
|
| @@ -169,7 +170,7 @@ PlatformFileError QuotaFileUtil::CreateDirectory(
|
| FilePath last_path;
|
| for (FilePath path = fs_context->src_virtual_path();
|
| path.value() != last_path.value() &&
|
| - !fs_context->src_file_system_file_util()->PathExists(
|
| + !fs_context->src_file_util()->PathExists(
|
| fs_context, fs_context->src_virtual_path());
|
| path = path.DirName()) {
|
| growth += ComputeFilePathCost(fs_context->src_virtual_path());
|
| @@ -191,7 +192,7 @@ PlatformFileError QuotaFileUtil::CreateDirectory(
|
| }
|
|
|
| base::PlatformFileError error = base::PLATFORM_FILE_OK;
|
| - error = underlying_file_util_->CreateDirectory(
|
| + error = underlying_file_util()->CreateDirectory(
|
| fs_context, file_path, exclusive, recursive);
|
|
|
| if (growth > 0 && error == base::PLATFORM_FILE_OK)
|
| @@ -238,7 +239,7 @@ base::PlatformFileError QuotaFileUtil::CopyOrMoveFile(
|
| return base::PLATFORM_FILE_ERROR_NO_SPACE;
|
| }
|
|
|
| - base::PlatformFileError error = underlying_file_util_->CopyOrMoveFile(
|
| + base::PlatformFileError error = underlying_file_util()->CopyOrMoveFile(
|
| fs_context, src_file_path, dest_file_path, copy);
|
|
|
| if (error == base::PLATFORM_FILE_OK) {
|
| @@ -266,7 +267,7 @@ base::PlatformFileError QuotaFileUtil::DeleteFile(
|
| ComputeFilePathCost(fs_context->src_virtual_path());
|
| }
|
|
|
| - base::PlatformFileError error = underlying_file_util_->DeleteFile(
|
| + base::PlatformFileError error = underlying_file_util()->DeleteFile(
|
| fs_context, file_path);
|
|
|
| if (error == base::PLATFORM_FILE_OK)
|
| @@ -288,7 +289,7 @@ base::PlatformFileError QuotaFileUtil::DeleteSingleDirectory(
|
| if (file_util::DirectoryExists(file_path))
|
| growth -= ComputeFilePathCost(fs_context->src_virtual_path());
|
|
|
| - base::PlatformFileError error = underlying_file_util_->DeleteSingleDirectory(
|
| + base::PlatformFileError error = underlying_file_util()->DeleteSingleDirectory(
|
| fs_context, file_path);
|
|
|
| if (error == base::PLATFORM_FILE_OK)
|
| @@ -316,7 +317,7 @@ base::PlatformFileError QuotaFileUtil::Truncate(
|
| if (allowed_bytes_growth != kNoLimit && growth > allowed_bytes_growth)
|
| return base::PLATFORM_FILE_ERROR_NO_SPACE;
|
|
|
| - base::PlatformFileError error = underlying_file_util_->Truncate(
|
| + base::PlatformFileError error = underlying_file_util()->Truncate(
|
| fs_context, path, length);
|
|
|
| if (error == base::PLATFORM_FILE_OK)
|
|
|