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

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: Adjusted comment 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
« no previous file with comments | « no previous file | components/sync/driver/glue/sync_backend_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..eb7891408434eb61a60192f58004b96640b7417f 100644
--- a/components/sync/driver/glue/sync_backend_host_impl.cc
+++ b/components/sync/driver/glue/sync_backend_host_impl.cc
@@ -284,6 +284,10 @@ ModelTypeSet SyncBackendHostImpl::ConfigureDataTypes(
ModelTypeSet types_to_purge = Difference(ModelTypeSet::All(), current_types);
ModelTypeSet inactive_types =
GetDataTypesInState(CONFIGURE_INACTIVE, config_state_map);
+ // Include clean_first_types in types_to_purge, they are part of
+ // current_types, but still need to be cleared.
+ DCHECK(current_types.HasAll(clean_first_types));
+ types_to_purge.PutAll(clean_first_types);
types_to_purge.RemoveAll(inactive_types);
types_to_purge.RemoveAll(unready_types);
« no previous file with comments | « no previous file | components/sync/driver/glue/sync_backend_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698