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

Unified Diff: chrome/browser/sync/backend_migrator.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/backend_migrator.cc
diff --git a/chrome/browser/sync/backend_migrator.cc b/chrome/browser/sync/backend_migrator.cc
index 72e711c60630011faa2982082b6d75646017a1d3..e6c50020f33aa9cecddf72777bd0882c3e5f2533 100644
--- a/chrome/browser/sync/backend_migrator.cc
+++ b/chrome/browser/sync/backend_migrator.cc
@@ -101,22 +101,10 @@ bool BackendMigrator::TryStart() {
void BackendMigrator::RestartMigration() {
// We'll now disable any running types that need to be migrated.
ChangeState(DISABLING_TYPES);
- const ModelTypeSet full_set = service_->GetPreferredDataTypes();
- const ModelTypeSet difference = Difference(full_set, to_migrate_);
- bool configure_with_nigori = !to_migrate_.Has(syncer::NIGORI);
SDVLOG(1) << "BackendMigrator disabling types "
- << ModelTypeSetToString(to_migrate_) << "; configuring "
- << ModelTypeSetToString(difference)
- << (configure_with_nigori ? " with nigori" : " without nigori");
-
- // Add nigori for config or not based upon if the server told us to migrate
- // nigori or not.
- if (configure_with_nigori) {
- manager_->Configure(difference, syncer::CONFIGURE_REASON_MIGRATION);
- } else {
- manager_->ConfigureWithoutNigori(difference,
- syncer::CONFIGURE_REASON_MIGRATION);
- }
+ << ModelTypeSetToString(to_migrate_);
+
+ manager_->PurgeForMigration(to_migrate_, syncer::CONFIGURE_REASON_MIGRATION);
}
void BackendMigrator::OnConfigureDone(
« no previous file with comments | « no previous file | chrome/browser/sync/backend_migrator_unittest.cc » ('j') | sync/internal_api/public/base/model_type.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698