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

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 comment, fix purging behavior 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..0bf20f7a70933988d24d764bfac3e5112cf7e8ad 100644
--- a/chrome/browser/sync/glue/sync_backend_host_impl.cc
+++ b/chrome/browser/sync/glue/sync_backend_host_impl.cc
@@ -347,8 +347,11 @@ 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);
disabled_types.PutAll(crypto_types);
+ disabled_types.PutAll(unready_types);
haitaol1 2014/06/19 18:14:35 This will remove routing info of unready types in
Nicolas Zea 2014/06/19 21:13:02 Hmm, I suspect you're right. They'll both be purge
syncer::ModelTypeSet active_types =
GetDataTypesInState(CONFIGURE_ACTIVE, config_state_map);
syncer::ModelTypeSet clean_first_types =
@@ -392,6 +395,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