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

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

Issue 398813005: [Sync] Rely on directory to decide which types need to be purged (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/sync/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: 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 dc0de63237f7dc4872aca1018e7b95145a3bc8db..b8913ea549f2abd4b6bf354c9b9eb8fd73181b98 100644
--- a/chrome/browser/sync/glue/sync_backend_host_impl.cc
+++ b/chrome/browser/sync/glue/sync_backend_host_impl.cc
@@ -339,8 +339,6 @@ void SyncBackendHostImpl::ConfigureDataTypes(
// backend because configuration requests are never aborted; they are retried
// until they succeed or the backend is shut down.
- syncer::ModelTypeSet previous_types = registrar_->GetLastConfiguredTypes();
-
syncer::ModelTypeSet disabled_types =
GetDataTypesInState(DISABLED, config_state_map);
syncer::ModelTypeSet fatal_types =
@@ -349,10 +347,8 @@ void SyncBackendHostImpl::ConfigureDataTypes(
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(fatal_types);
disabled_types.PutAll(crypto_types);
disabled_types.PutAll(unready_types);
@@ -395,7 +391,7 @@ void SyncBackendHostImpl::ConfigureDataTypes(
syncer::ModelTypeSet current_types = registrar_->GetLastConfiguredTypes();
syncer::ModelTypeSet types_to_purge =
- syncer::Difference(previous_types, current_types);
+ syncer::Difference(syncer::ModelTypeSet::All(), current_types);
syncer::ModelTypeSet inactive_types =
GetDataTypesInState(CONFIGURE_INACTIVE, config_state_map);
types_to_purge.RemoveAll(inactive_types);
« no previous file with comments | « no previous file | chrome/browser/sync/glue/sync_backend_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698