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

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

Issue 312163004: [Sync] Add support for dynamically enabling/disabling types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 6 years, 6 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/sync_backend_host_impl.cc
diff --git a/chrome/browser/sync/glue/sync_backend_host_impl.cc b/chrome/browser/sync/glue/sync_backend_host_impl.cc
index 253db617d6b24f2920171bbe8d5af70e20289204..5f38753fb27021e2d81d6930c1a4f9f1c3c45cf2 100644
--- a/chrome/browser/sync/glue/sync_backend_host_impl.cc
+++ b/chrome/browser/sync/glue/sync_backend_host_impl.cc
@@ -347,8 +347,15 @@ void SyncBackendHostImpl::ConfigureDataTypes(
GetDataTypesInState(FATAL, config_state_map);
syncer::ModelTypeSet crypto_types =
GetDataTypesInState(CRYPTO, config_state_map);
+ syncer::ModelTypeSet unready_types =
+ GetDataTypesInState(UNREADY, config_state_map);
disabled_types.PutAll(fatal_types);
+
+ // TODO(zea): These types won't be fully purged if they are subsequently
+ // disabled by the user. Fix that. See crbug.com/386778
disabled_types.PutAll(crypto_types);
+ disabled_types.PutAll(unready_types);
+
syncer::ModelTypeSet active_types =
GetDataTypesInState(CONFIGURE_ACTIVE, config_state_map);
syncer::ModelTypeSet clean_first_types =
@@ -392,6 +399,7 @@ void SyncBackendHostImpl::ConfigureDataTypes(
syncer::ModelTypeSet inactive_types =
GetDataTypesInState(CONFIGURE_INACTIVE, config_state_map);
types_to_purge.RemoveAll(inactive_types);
+ types_to_purge.RemoveAll(unready_types);
// If a type has already been disabled and unapplied or journaled, it will
// not be part of the |types_to_purge| set, and therefore does not need

Powered by Google App Engine
This is Rietveld 408576698