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

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

Issue 285323002: drive: Remove FileCache::GetCacheEntry (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 93ca0a14582104448ef1476ba697231e6cf6e0ba..d3f3af8deea78b0cc456a92c87553b2fa90365dc 100644
--- a/chrome/browser/chromeos/drive/file_system/copy_operation.cc
+++ b/chrome/browser/chromeos/drive/file_system/copy_operation.cc
@@ -117,11 +117,8 @@ 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;
- 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()) {
+ if (!params->src_entry.file_specific_info().cache_state().is_present() &&
+ !params->src_entry.resource_id().empty()) {
*should_copy_on_server = true;
return FILE_ERROR_OK;
}
@@ -147,7 +144,7 @@ FileError TryToCopyLocally(internal::ResourceMetadata* metadata,
updated_local_ids->push_back(local_id);
*directory_changed = true;
- if (!cache_entry.is_present()) {
+ if (!params->src_entry.file_specific_info().cache_state().is_present()) {
DCHECK(params->src_entry.resource_id().empty());
// Locally created empty file may have no cache file.
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