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

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

Issue 54223003: drive: Recover cache entries from trashed DB to filter out non-dirty cache files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 2 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 | « no previous file | chrome/browser/chromeos/drive/file_cache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/drive/drive_integration_service.cc
diff --git a/chrome/browser/chromeos/drive/drive_integration_service.cc b/chrome/browser/chromeos/drive/drive_integration_service.cc
index 66a3b4bd4f652e202715633dd15fcf5d58aa8c66..aae5cf21ce349b1911cd9e373a849fb99fd15bf0 100644
--- a/chrome/browser/chromeos/drive/drive_integration_service.cc
+++ b/chrome/browser/chromeos/drive/drive_integration_service.cc
@@ -143,9 +143,14 @@ FileError InitializeMetadata(
.InsertBeforeExtensionASCII(base::StringPrintf(" (%d)", uniquifier));
}
+ std::map<std::string, FileCacheEntry> recovered_cache_entries;
+ metadata_storage->RecoverCacheEntriesFromTrashedResourceMap(
+ &recovered_cache_entries);
+
LOG(INFO) << "DB could not be opened for some reasons. "
<< "Recovering cache files to " << dest_directory.value();
- if (!cache->RecoverFilesFromCacheDirectory(dest_directory)) {
+ if (!cache->RecoverFilesFromCacheDirectory(dest_directory,
+ recovered_cache_entries)) {
LOG(WARNING) << "Failed to recover cache files.";
return FILE_ERROR_FAILED;
}
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/file_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698