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

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

Issue 2563883006: [Sync] Separate purge types step from sync manager 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
« no previous file with comments | « components/sync/driver/glue/sync_backend_host_impl.h ('k') | components/sync/engine/fake_sync_manager.h » ('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 20d2462b02dfce73a9e969b9681c5e9baaa95211..1b135cb8dff44c0a57730a6c2e8311c7873501d6 100644
--- a/components/sync/driver/glue/sync_backend_host_impl.cc
+++ b/components/sync/driver/glue/sync_backend_host_impl.cc
@@ -366,9 +366,11 @@ ModelTypeSet SyncBackendHostImpl::ConfigureDataTypes(
// from the directory.
// - Everything else (enabled types and already disabled types) is not
// touched.
- RequestConfigureSyncer(reason, types_to_download, types_to_purge, fatal_types,
- unapply_types, inactive_types, routing_info,
- ready_task, retry_callback);
+ sync_task_runner_->PostTask(
+ FROM_HERE, base::Bind(&SyncBackendHostCore::DoPurgeDisabledTypes, core_,
+ types_to_purge, fatal_types, unapply_types));
+ RequestConfigureSyncer(reason, types_to_download, routing_info, ready_task,
+ retry_callback);
DCHECK(Intersection(active_types, types_to_purge).Empty());
DCHECK(Intersection(active_types, fatal_types).Empty());
@@ -499,22 +501,13 @@ void SyncBackendHostImpl::InitCore(
void SyncBackendHostImpl::RequestConfigureSyncer(
ConfigureReason reason,
ModelTypeSet to_download,
- ModelTypeSet to_purge,
- ModelTypeSet to_journal,
- ModelTypeSet to_unapply,
- ModelTypeSet to_ignore,
const ModelSafeRoutingInfo& routing_info,
const base::Callback<void(ModelTypeSet, ModelTypeSet)>& ready_task,
const base::Closure& retry_callback) {
- DoConfigureSyncerTypes config_types;
- config_types.to_download = to_download;
- config_types.to_purge = to_purge;
- config_types.to_journal = to_journal;
- config_types.to_unapply = to_unapply;
sync_task_runner_->PostTask(
FROM_HERE,
base::Bind(&SyncBackendHostCore::DoConfigureSyncer, core_, reason,
- config_types, routing_info, ready_task, retry_callback));
+ to_download, routing_info, ready_task, retry_callback));
}
void SyncBackendHostImpl::FinishConfigureDataTypesOnFrontendLoop(
« no previous file with comments | « components/sync/driver/glue/sync_backend_host_impl.h ('k') | components/sync/engine/fake_sync_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698