Index: sync/syncable/directory.cc |
diff --git a/sync/syncable/directory.cc b/sync/syncable/directory.cc |
index 7b583647072792ad310c52e74d33a566ab83f673..15ff4e3f08ecd1bfd1a622a5d2760e2ac08fc71d 100644 |
--- a/sync/syncable/directory.cc |
+++ b/sync/syncable/directory.cc |
@@ -82,7 +82,10 @@ void Directory::InitKernelForTest( |
Directory::PersistedKernelInfo::PersistedKernelInfo() |
: next_id(0) { |
for (int i = FIRST_REAL_MODEL_TYPE; i < MODEL_TYPE_COUNT; ++i) { |
- reset_download_progress(ModelTypeFromInt(i)); |
+ ModelType type = ModelTypeFromInt(i); |
+ if (VirtualTypes().Has(type)) |
+ continue; |
+ reset_download_progress(type); |
transaction_version[i] = 0; |
} |
} |
@@ -564,6 +567,7 @@ bool Directory::VacuumAfterSaveChanges(const SaveChangesSnapshot& snapshot) { |
bool Directory::PurgeEntriesWithTypeIn(ModelTypeSet types, |
ModelTypeSet types_to_journal) { |
DCHECK(types.HasAll(types_to_journal)); |
+ types.RemoveAll(VirtualTypes()); |
if (types.Empty()) |
return true; |
@@ -704,7 +708,8 @@ void Directory::IncrementTransactionVersion(ModelType type) { |
ModelTypeSet Directory::InitialSyncEndedTypes() { |
syncable::ReadTransaction trans(FROM_HERE, this); |
- const ModelTypeSet all_types = ModelTypeSet::All(); |
+ ModelTypeSet all_types = ModelTypeSet::All(); |
+ all_types.RemoveAll(VirtualTypes()); |
ModelTypeSet initial_sync_ended_types; |
for (ModelTypeSet::Iterator i = all_types.First(); i.Good(); i.Inc()) { |
if (InitialSyncEndedForType(&trans, i.Get())) { |