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

Unified Diff: chrome/browser/chromeos/drive/file_system/copy_operation.cc

Issue 278273002: drive: Change the return type of ResourceMetadata's methods to FileError (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/chromeos/drive/file_system/copy_operation.cc
diff --git a/chrome/browser/chromeos/drive/file_system/copy_operation.cc b/chrome/browser/chromeos/drive/file_system/copy_operation.cc
index 3479c1f9271dcc7c52528b9ecd6c93e5c1bee903..b6689f50539aa48583ef67281ff94ce0060d0ba9 100644
--- a/chrome/browser/chromeos/drive/file_system/copy_operation.cc
+++ b/chrome/browser/chromeos/drive/file_system/copy_operation.cc
@@ -187,10 +187,10 @@ FileError UpdateLocalStateForServerSideOperation(
if (error == FILE_ERROR_EXISTS)
error = metadata->GetIdByResourceId(entry.resource_id(), &local_id);
- if (error == FILE_ERROR_OK)
- *file_path = metadata->GetFilePath(local_id);
+ if (error != FILE_ERROR_OK)
+ return error;
- return error;
+ return metadata->GetFilePath(local_id, file_path);
}
// Stores the file at |local_file_path| to the cache as a content of entry at
@@ -263,9 +263,9 @@ FileError LocalWorkForTransferJsonGdocFile(
entry.set_metadata_edit_state(ResourceEntry::DIRTY);
entry.set_modification_date(base::Time::Now().ToInternalValue());
error = metadata->RefreshEntry(entry);
- if (error == FILE_ERROR_OK)
- params->changed_path = metadata->GetFilePath(local_id);
- return error;
+ if (error != FILE_ERROR_OK)
+ return error;
+ return metadata->GetFilePath(local_id, &params->changed_path);
}
params->location_type = HAS_PARENT;
« no previous file with comments | « chrome/browser/chromeos/drive/file_system.cc ('k') | chrome/browser/chromeos/drive/file_system/create_directory_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698