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

Unified Diff: sync/syncable/directory.cc

Issue 11958029: [Sync] Add support for proxy types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 7 years, 11 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/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())) {

Powered by Google App Engine
This is Rietveld 408576698