summaryrefslogtreecommitdiffstats
path: root/webkit/browser/fileapi/async_file_util_adapter.cc
diff options
context:
space:
mode:
authorrvargas@chromium.org <rvargas@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-27 21:36:00 +0000
committerrvargas@chromium.org <rvargas@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-27 21:36:00 +0000
commit141bcc5b660175f90a351d0b1fc412eecbeb70e6 (patch)
tree8e168b52c493c7de6b18f7d06efeffa2971e5b03 /webkit/browser/fileapi/async_file_util_adapter.cc
parent1f0a90767aadea0859d037be675106941338c5e5 (diff)
downloadchromium_src-141bcc5b660175f90a351d0b1fc412eecbeb70e6.zip
chromium_src-141bcc5b660175f90a351d0b1fc412eecbeb70e6.tar.gz
chromium_src-141bcc5b660175f90a351d0b1fc412eecbeb70e6.tar.bz2
Convert Media Galleries to use base::File
Unfortunately, this brings in changes to webkit/browser/fileapi, and once that changes, a lot of files have to be updated. The bright side is that most of the collateral changes are just trivial renaming of PlatformFileError -> File::Error and PlatformFileInfo -> File::Info BUG=322664 Review URL: https://codereview.chromium.org/145303002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247301 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/browser/fileapi/async_file_util_adapter.cc')
-rw-r--r--webkit/browser/fileapi/async_file_util_adapter.cc29
1 files changed, 14 insertions, 15 deletions
diff --git a/webkit/browser/fileapi/async_file_util_adapter.cc b/webkit/browser/fileapi/async_file_util_adapter.cc
index b25ddf2..6950002 100644
--- a/webkit/browser/fileapi/async_file_util_adapter.cc
+++ b/webkit/browser/fileapi/async_file_util_adapter.cc
@@ -19,7 +19,6 @@
using base::Bind;
using base::Callback;
using base::Owned;
-using base::PlatformFileError;
using base::Unretained;
using webkit_blob::ShareableFileReference;
@@ -29,7 +28,7 @@ namespace {
class EnsureFileExistsHelper {
public:
- EnsureFileExistsHelper() : error_(base::PLATFORM_FILE_OK), created_(false) {}
+ EnsureFileExistsHelper() : error_(base::File::FILE_OK), created_(false) {}
void RunWork(FileSystemFileUtil* file_util,
FileSystemOperationContext* context,
@@ -42,7 +41,7 @@ class EnsureFileExistsHelper {
}
private:
- base::PlatformFileError error_;
+ base::File::Error error_;
bool created_;
DISALLOW_COPY_AND_ASSIGN(EnsureFileExistsHelper);
};
@@ -50,7 +49,7 @@ class EnsureFileExistsHelper {
class GetFileInfoHelper {
public:
GetFileInfoHelper()
- : error_(base::PLATFORM_FILE_OK) {}
+ : error_(base::File::FILE_OK) {}
void GetFileInfo(FileSystemFileUtil* file_util,
FileSystemOperationContext* context,
@@ -76,8 +75,8 @@ class GetFileInfoHelper {
}
private:
- base::PlatformFileError error_;
- base::PlatformFileInfo file_info_;
+ base::File::Error error_;
+ base::File::Info file_info_;
base::FilePath platform_path_;
webkit_blob::ScopedFile scoped_file_;
DISALLOW_COPY_AND_ASSIGN(GetFileInfoHelper);
@@ -85,21 +84,21 @@ class GetFileInfoHelper {
class ReadDirectoryHelper {
public:
- ReadDirectoryHelper() : error_(base::PLATFORM_FILE_OK) {}
+ ReadDirectoryHelper() : error_(base::File::FILE_OK) {}
void RunWork(FileSystemFileUtil* file_util,
FileSystemOperationContext* context,
const FileSystemURL& url) {
- base::PlatformFileInfo file_info;
+ base::File::Info file_info;
base::FilePath platform_path;
- PlatformFileError error = file_util->GetFileInfo(
+ base::File::Error error = file_util->GetFileInfo(
context, url, &file_info, &platform_path);
- if (error != base::PLATFORM_FILE_OK) {
+ if (error != base::File::FILE_OK) {
error_ = error;
return;
}
if (!file_info.is_directory) {
- error_ = base::PLATFORM_FILE_ERROR_NOT_A_DIRECTORY;
+ error_ = base::File::FILE_ERROR_NOT_A_DIRECTORY;
return;
}
@@ -115,7 +114,7 @@ class ReadDirectoryHelper {
entry.last_modified_time = file_enum->LastModifiedTime();
entries_.push_back(entry);
}
- error_ = base::PLATFORM_FILE_OK;
+ error_ = base::File::FILE_OK;
}
void Reply(const AsyncFileUtil::ReadDirectoryCallback& callback) {
@@ -123,14 +122,14 @@ class ReadDirectoryHelper {
}
private:
- base::PlatformFileError error_;
+ base::File::Error error_;
std::vector<DirectoryEntry> entries_;
DISALLOW_COPY_AND_ASSIGN(ReadDirectoryHelper);
};
void RunCreateOrOpenCallback(
const AsyncFileUtil::CreateOrOpenCallback& callback,
- base::PlatformFileError result,
+ base::File::Error result,
base::PassPlatformFile file,
bool created) {
callback.Run(result, file, base::Closure());
@@ -332,7 +331,7 @@ void AsyncFileUtilAdapter::DeleteRecursively(
scoped_ptr<FileSystemOperationContext> context,
const FileSystemURL& url,
const StatusCallback& callback) {
- callback.Run(base::PLATFORM_FILE_ERROR_INVALID_OPERATION);
+ callback.Run(base::File::FILE_ERROR_INVALID_OPERATION);
}
void AsyncFileUtilAdapter::CreateSnapshotFile(