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

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

Issue 18948004: drive: Remove MD5 argument from FileCache::MarkDirty (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 32455e9ec8739d883a63dd719e2249d81a66cfed..1b1ef5e407ea30bb451fd200f2c1ed93e0f16957 100644
--- a/chrome/browser/chromeos/drive/file_cache.cc
+++ b/chrome/browser/chromeos/drive/file_cache.cc
@@ -390,7 +390,6 @@ void FileCache::MarkAsUnmountedOnUIThread(
}
void FileCache::MarkDirtyOnUIThread(const std::string& resource_id,
- const std::string& md5,
const FileOperationCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!callback.is_null());
@@ -398,28 +397,20 @@ void FileCache::MarkDirtyOnUIThread(const std::string& resource_id,
base::PostTaskAndReplyWithResult(
blocking_task_runner_.get(),
FROM_HERE,
- base::Bind(
- &FileCache::MarkDirty, base::Unretained(this), resource_id, md5),
+ base::Bind(&FileCache::MarkDirty, base::Unretained(this), resource_id),
callback);
}
-FileError FileCache::MarkDirty(const std::string& resource_id,
- const std::string& md5) {
+FileError FileCache::MarkDirty(const std::string& resource_id) {
AssertOnSequencedWorkerPool();
- // If file has already been marked dirty in previous instance of chrome, we
- // would have lost the md5 info during cache initialization, because the file
- // would have been renamed to .local extension.
- // So, search for entry in cache without comparing md5.
-
// Marking a file dirty means its entry and actual file blob must exist in
// cache.
FileCacheEntry cache_entry;
- if (!GetCacheEntry(resource_id, md5, &cache_entry) ||
+ if (!storage_->GetCacheEntry(resource_id, &cache_entry) ||
!cache_entry.is_present()) {
- LOG(WARNING) << "Can't mark dirty a file that wasn't cached: res_id="
- << resource_id
- << ", md5=" << md5;
+ LOG(WARNING) << "Can't mark dirty a file that wasn't cached: "
+ << resource_id;
return FILE_ERROR_NOT_FOUND;
}
« 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