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

Unified Diff: chrome/browser/chromeos/drive/file_cache.cc

Issue 146833015: drive: FileCache::Store marks the entry as dirty if empty MD5 is given (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « chrome/browser/chromeos/drive/file_cache.h ('k') | chrome/browser/chromeos/drive/file_cache_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/drive/file_cache.cc
diff --git a/chrome/browser/chromeos/drive/file_cache.cc b/chrome/browser/chromeos/drive/file_cache.cc
index 9bdd09b910b749e1a4a0694f35ce6d9955d4b34e..336468c2263e334e5757037e9b325d33cc018510 100644
--- a/chrome/browser/chromeos/drive/file_cache.cc
+++ b/chrome/browser/chromeos/drive/file_cache.cc
@@ -181,7 +181,8 @@ FileError FileCache::Store(const std::string& id,
// Now that file operations have completed, update metadata.
cache_entry.set_md5(md5);
cache_entry.set_is_present(true);
- cache_entry.set_is_dirty(false);
+ if (md5.empty())
+ cache_entry.set_is_dirty(true);
return storage_->PutCacheEntry(id, cache_entry) ?
FILE_ERROR_OK : FILE_ERROR_FAILED;
}
« no previous file with comments | « chrome/browser/chromeos/drive/file_cache.h ('k') | chrome/browser/chromeos/drive/file_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698