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

Unified Diff: sync/syncable/in_memory_directory_backing_store.cc

Issue 1008103002: Sync: Avoid 3 passes over SyncDarta DB when loading the directory from the disk (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added unit test Created 5 years, 9 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: sync/syncable/in_memory_directory_backing_store.cc
diff --git a/sync/syncable/in_memory_directory_backing_store.cc b/sync/syncable/in_memory_directory_backing_store.cc
index 57995f823789ba15d06cbe2b066a6768dbe7bb18..8f84baa9b536e5aefeddcc9034ba1759345242ff 100644
--- a/sync/syncable/in_memory_directory_backing_store.cc
+++ b/sync/syncable/in_memory_directory_backing_store.cc
@@ -16,6 +16,7 @@ InMemoryDirectoryBackingStore::InMemoryDirectoryBackingStore(
DirOpenResult InMemoryDirectoryBackingStore::Load(
Directory::MetahandlesMap* handles_map,
JournalIndex* delete_journals,
+ MetahandleSet* metahandles_to_purge,
Directory::KernelLoadInfo* kernel_load_info) {
if (!db_->is_open()) {
if (!db_->OpenInMemory())
@@ -32,9 +33,7 @@ DirOpenResult InMemoryDirectoryBackingStore::Load(
}
}
- if (!DropDeletedEntries())
- return FAILED_DATABASE_CORRUPT;
- if (!LoadEntries(handles_map))
+ if (!LoadEntries(handles_map, metahandles_to_purge))
return FAILED_DATABASE_CORRUPT;
if (!LoadDeleteJournals(delete_journals))
return FAILED_DATABASE_CORRUPT;

Powered by Google App Engine
This is Rietveld 408576698