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

Unified Diff: chrome/browser/chromeos/drive/file_system.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.cc
diff --git a/chrome/browser/chromeos/drive/file_system.cc b/chrome/browser/chromeos/drive/file_system.cc
index 4fd1c20aafad4e52caddef84729ffc53475413b1..598a37598fa0cac827c20eb436724c9691b9aa42 100644
--- a/chrome/browser/chromeos/drive/file_system.cc
+++ b/chrome/browser/chromeos/drive/file_system.cc
@@ -62,16 +62,13 @@ FileError GetLocallyStoredResourceEntry(
return FILE_ERROR_OK;
// When cache is not found, use the original resource entry as is.
- FileCacheEntry cache_entry;
- error = cache->GetCacheEntry(local_id, &cache_entry);
- if (error == FILE_ERROR_NOT_FOUND)
+ if (!entry->file_specific_info().has_cache_state())
return FILE_ERROR_OK;
- if (error != FILE_ERROR_OK)
- return error;
// When cache is non-dirty and obsolete (old hash), use the original entry.
- if (!cache_entry.is_dirty() &&
- entry->file_specific_info().md5() != cache_entry.md5())
+ if (!entry->file_specific_info().cache_state().is_dirty() &&
+ entry->file_specific_info().md5() !=
+ entry->file_specific_info().cache_state().md5())
return FILE_ERROR_OK;
// If there's a valid cache, obtain the file info from the cache file itself.
« no previous file with comments | « chrome/browser/chromeos/drive/file_cache_unittest.cc ('k') | chrome/browser/chromeos/drive/file_system/copy_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698