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

Unified Diff: sync/test/test_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: Addressed CR feedback. 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
« no previous file with comments | « sync/test/test_directory_backing_store.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/test/test_directory_backing_store.cc
diff --git a/sync/test/test_directory_backing_store.cc b/sync/test/test_directory_backing_store.cc
index 6a16a0661a62c2030d5c4c9be38956819fe6d95f..f382cc568ddfc286c557358241f2d7732195d458 100644
--- a/sync/test/test_directory_backing_store.cc
+++ b/sync/test/test_directory_backing_store.cc
@@ -24,15 +24,14 @@ TestDirectoryBackingStore::~TestDirectoryBackingStore() {
DirOpenResult TestDirectoryBackingStore::Load(
Directory::MetahandlesMap* handles_map,
JournalIndex* delete_journals,
+ MetahandleSet* metahandles_to_purge,
Directory::KernelLoadInfo* kernel_load_info) {
DCHECK(db_->is_open());
if (!InitializeTables())
return FAILED_OPEN_DATABASE;
- 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;
@@ -44,5 +43,10 @@ DirOpenResult TestDirectoryBackingStore::Load(
return OPENED;
}
+bool TestDirectoryBackingStore::DeleteEntries(const MetahandleSet& handles) {
+ return DirectoryBackingStore::DeleteEntries(
+ DirectoryBackingStore::METAS_TABLE, handles);
+}
+
} // namespace syncable
} // namespace syncer
« no previous file with comments | « sync/test/test_directory_backing_store.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698