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

Unified Diff: chrome/browser/sync/glue/data_type_manager_impl.cc

Issue 10832286: sync: Introduce control data types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add ToFullModelTypeSet() function Created 8 years, 4 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: chrome/browser/sync/glue/data_type_manager_impl.cc
diff --git a/chrome/browser/sync/glue/data_type_manager_impl.cc b/chrome/browser/sync/glue/data_type_manager_impl.cc
index d9e0bb4c0a1375bdfad7fedb848d2668da01f104..6c81668b4ab761b0f77b0449174d3651707959f3 100644
--- a/chrome/browser/sync/glue/data_type_manager_impl.cc
+++ b/chrome/browser/sync/glue/data_type_manager_impl.cc
@@ -46,15 +46,15 @@ DataTypeManagerImpl::~DataTypeManagerImpl() {}
void DataTypeManagerImpl::Configure(TypeSet desired_types,
syncer::ConfigureReason reason) {
- desired_types.Put(syncer::NIGORI);
+ desired_types.PutAll(syncer::ControlTypes());
ConfigureImpl(desired_types, reason);
}
-void DataTypeManagerImpl::ConfigureWithoutNigori(
- TypeSet desired_types,
+void DataTypeManagerImpl::PurgeForMigration(
+ TypeSet undesired_types,
syncer::ConfigureReason reason) {
- DCHECK(!desired_types.Has(syncer::NIGORI));
- ConfigureImpl(desired_types, reason);
+ TypeSet remainder = Difference(last_requested_types_, undesired_types);
+ ConfigureImpl(remainder, reason);
}
void DataTypeManagerImpl::ConfigureImpl(
@@ -114,8 +114,8 @@ void DataTypeManagerImpl::Restart(syncer::ConfigureReason reason) {
controllers_->begin(); it != controllers_->end(); ++it) {
all_types.Put(it->first);
}
- // NIGORI has no controller. We must add it manually.
- all_types.Put(syncer::NIGORI);
+ // These have no controller. We must add them manually.
+ all_types.PutAll(syncer::ControlTypes());
const syncer::ModelTypeSet types_to_add = last_requested_types_;
// Check that types_to_add \subseteq all_types.
DCHECK(all_types.HasAll(types_to_add));

Powered by Google App Engine
This is Rietveld 408576698