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

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

Issue 276313002: drive: Change FileCache::GetCacheEntry's return type 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..fd4bc66d310460d3d0744c72af2652f22b2b0339 100644
--- a/chrome/browser/chromeos/drive/file_system/copy_operation.cc
+++ b/chrome/browser/chromeos/drive/file_system/copy_operation.cc
@@ -118,7 +118,9 @@ FileError TryToCopyLocally(internal::ResourceMetadata* metadata,
// If the cache file is not present and the entry exists on the server,
// server side copy should be used.
FileCacheEntry cache_entry;
- cache->GetCacheEntry(params->src_entry.local_id(), &cache_entry);
+ error = cache->GetCacheEntry(params->src_entry.local_id(), &cache_entry);
+ if (error != FILE_ERROR_OK && error != FILE_ERROR_NOT_FOUND)
+ return error;
if (!cache_entry.is_present() && !params->src_entry.resource_id().empty()) {
*should_copy_on_server = true;
return FILE_ERROR_OK;
« no previous file with comments | « chrome/browser/chromeos/drive/file_system.cc ('k') | chrome/browser/chromeos/drive/file_system/copy_operation_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698