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

Unified Diff: components/sync/driver/glue/sync_backend_host_impl.cc

Issue 2580033002: [Sync] Ensure that CONFIGURE_CLEAN types get unapplied before configuration (Closed)
Patch Set: Created 4 years 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: components/sync/driver/glue/sync_backend_host_impl.cc
diff --git a/components/sync/driver/glue/sync_backend_host_impl.cc b/components/sync/driver/glue/sync_backend_host_impl.cc
index b125c4482823f753def6fe15a43af09cb18650f1..4cb9333a100a945610ff1c6de47e5046afa1800f 100644
--- a/components/sync/driver/glue/sync_backend_host_impl.cc
+++ b/components/sync/driver/glue/sync_backend_host_impl.cc
@@ -281,7 +281,8 @@ ModelTypeSet SyncBackendHostImpl::ConfigureDataTypes(
registrar_->GetModelSafeRoutingInfo(&routing_info);
ModelTypeSet current_types = registrar_->GetLastConfiguredTypes();
- ModelTypeSet types_to_purge = Difference(ModelTypeSet::All(), current_types);
+ ModelTypeSet types_to_purge = Difference(
+ ModelTypeSet::All(), Difference(current_types, clean_first_types));
Nicolas Zea 2016/12/16 22:08:42 I think it might be simpler to understand if we ju
pavely 2016/12/16 23:57:46 Done.
ModelTypeSet inactive_types =
GetDataTypesInState(CONFIGURE_INACTIVE, config_state_map);
types_to_purge.RemoveAll(inactive_types);

Powered by Google App Engine
This is Rietveld 408576698