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

Unified Diff: chrome/browser/sync_file_system/local/syncable_file_system_operation.cc

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/sync_file_system/local/syncable_file_system_operation.cc
diff --git a/chrome/browser/sync_file_system/local/syncable_file_system_operation.cc b/chrome/browser/sync_file_system/local/syncable_file_system_operation.cc
index 51a3cbf94e666732ca3b1037688941159acb7847..ce824e28a90541710e01dd0d717870c4736251a1 100644
--- a/chrome/browser/sync_file_system/local/syncable_file_system_operation.cc
+++ b/chrome/browser/sync_file_system/local/syncable_file_system_operation.cc
@@ -25,7 +25,7 @@ namespace {
void WriteCallbackAdapter(
const SyncableFileSystemOperation::WriteCallback& callback,
- base::PlatformFileError status) {
+ base::File::Error status) {
callback.Run(status, 0, true);
}
@@ -79,7 +79,7 @@ void SyncableFileSystemOperation::CreateFile(
const StatusCallback& callback) {
DCHECK(CalledOnValidThread());
if (!operation_runner_.get()) {
- callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND);
+ callback.Run(base::File::FILE_ERROR_NOT_FOUND);
return;
}
DCHECK(operation_runner_.get());
@@ -101,11 +101,11 @@ void SyncableFileSystemOperation::CreateDirectory(
const StatusCallback& callback) {
DCHECK(CalledOnValidThread());
if (!operation_runner_.get()) {
- callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND);
+ callback.Run(base::File::FILE_ERROR_NOT_FOUND);
return;
}
if (!is_directory_operation_enabled_) {
- callback.Run(base::PLATFORM_FILE_ERROR_INVALID_OPERATION);
+ callback.Run(base::File::FILE_ERROR_INVALID_OPERATION);
return;
}
DCHECK(operation_runner_.get());
@@ -128,7 +128,7 @@ void SyncableFileSystemOperation::Copy(
const StatusCallback& callback) {
DCHECK(CalledOnValidThread());
if (!operation_runner_.get()) {
- callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND);
+ callback.Run(base::File::FILE_ERROR_NOT_FOUND);
return;
}
DCHECK(operation_runner_.get());
@@ -150,7 +150,7 @@ void SyncableFileSystemOperation::Move(
const StatusCallback& callback) {
DCHECK(CalledOnValidThread());
if (!operation_runner_.get()) {
- callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND);
+ callback.Run(base::File::FILE_ERROR_NOT_FOUND);
return;
}
DCHECK(operation_runner_.get());
@@ -202,7 +202,7 @@ void SyncableFileSystemOperation::Remove(
const StatusCallback& callback) {
DCHECK(CalledOnValidThread());
if (!operation_runner_.get()) {
- callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND);
+ callback.Run(base::File::FILE_ERROR_NOT_FOUND);
return;
}
DCHECK(operation_runner_.get());
@@ -224,7 +224,7 @@ void SyncableFileSystemOperation::Write(
const WriteCallback& callback) {
DCHECK(CalledOnValidThread());
if (!operation_runner_.get()) {
- callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND, 0, true);
+ callback.Run(base::File::FILE_ERROR_NOT_FOUND, 0, true);
return;
}
DCHECK(operation_runner_.get());
@@ -247,7 +247,7 @@ void SyncableFileSystemOperation::Truncate(
const StatusCallback& callback) {
DCHECK(CalledOnValidThread());
if (!operation_runner_.get()) {
- callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND);
+ callback.Run(base::File::FILE_ERROR_NOT_FOUND);
return;
}
DCHECK(operation_runner_.get());
@@ -297,7 +297,7 @@ void SyncableFileSystemOperation::CopyInForeignFile(
const StatusCallback& callback) {
DCHECK(CalledOnValidThread());
if (!operation_runner_.get()) {
- callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND);
+ callback.Run(base::File::FILE_ERROR_NOT_FOUND);
return;
}
DCHECK(operation_runner_.get());
@@ -345,7 +345,7 @@ void SyncableFileSystemOperation::MoveFileLocal(
impl_->MoveFileLocal(src_url, dest_url, option, callback);
}
-base::PlatformFileError SyncableFileSystemOperation::SyncGetPlatformPath(
+base::File::Error SyncableFileSystemOperation::SyncGetPlatformPath(
const FileSystemURL& url,
base::FilePath* platform_path) {
return impl_->SyncGetPlatformPath(url, platform_path);
@@ -374,7 +374,7 @@ SyncableFileSystemOperation::SyncableFileSystemOperation(
url.origin());
}
-void SyncableFileSystemOperation::DidFinish(base::PlatformFileError status) {
+void SyncableFileSystemOperation::DidFinish(base::File::Error status) {
DCHECK(CalledOnValidThread());
DCHECK(!completion_callback_.is_null());
if (operation_runner_.get())
@@ -384,7 +384,7 @@ void SyncableFileSystemOperation::DidFinish(base::PlatformFileError status) {
void SyncableFileSystemOperation::DidWrite(
const WriteCallback& callback,
- base::PlatformFileError result,
+ base::File::Error result,
int64 bytes,
bool complete) {
DCHECK(CalledOnValidThread());
@@ -399,7 +399,7 @@ void SyncableFileSystemOperation::DidWrite(
void SyncableFileSystemOperation::OnCancelled() {
DCHECK(!completion_callback_.is_null());
- completion_callback_.Run(base::PLATFORM_FILE_ERROR_ABORT);
+ completion_callback_.Run(base::File::FILE_ERROR_ABORT);
}
} // namespace sync_file_system

Powered by Google App Engine
This is Rietveld 408576698