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

Unified Diff: chrome/browser/sync/backend_migrator.cc

Issue 11961030: [Sync] Make SESSIONS an implicit type (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments 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: chrome/browser/sync/backend_migrator.cc
diff --git a/chrome/browser/sync/backend_migrator.cc b/chrome/browser/sync/backend_migrator.cc
index e6c50020f33aa9cecddf72777bd0882c3e5f2533..00e6bcfd5829f6813b9808e1047307d0f94c8611 100644
--- a/chrome/browser/sync/backend_migrator.cc
+++ b/chrome/browser/sync/backend_migrator.cc
@@ -46,6 +46,10 @@ BackendMigrator::~BackendMigrator() {
#define SDVLOG(verbose_level) DVLOG(verbose_level) << name_ << ": "
void BackendMigrator::MigrateTypes(syncer::ModelTypeSet types) {
+ if (!syncer::Intersection(types, syncer::VirtualTypes()).Empty()) {
+ LOG(WARNING) << "Local type migration attempted, dropping local types.";
+ types.RemoveAll(syncer::VirtualTypes());
+ }
const ModelTypeSet old_to_migrate = to_migrate_;
to_migrate_.PutAll(types);
SDVLOG(1) << "MigrateTypes called with " << ModelTypeSetToString(types)

Powered by Google App Engine
This is Rietveld 408576698