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

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

Issue 2563423005: [Sync] Move ConfigureDataTypes logic into DataTypeManagerImpl. (Closed)
Patch Set: Address comments. Created 3 years, 11 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: components/sync/driver/glue/sync_backend_host_core.cc
diff --git a/components/sync/driver/glue/sync_backend_host_core.cc b/components/sync/driver/glue/sync_backend_host_core.cc
index c448500b366aede67886cd53d13769f342e36674..b9345444f8770a596ae2595efba5424432210e99 100644
--- a/components/sync/driver/glue/sync_backend_host_core.cc
+++ b/components/sync/driver/glue/sync_backend_host_core.cc
@@ -508,22 +508,26 @@ void SyncBackendHostCore::DoPurgeDisabledTypes(const ModelTypeSet& to_purge,
}
void SyncBackendHostCore::DoConfigureSyncer(
- ConfigureReason reason,
- const ModelTypeSet& to_download,
- const ModelSafeRoutingInfo routing_info,
- const base::Callback<void(ModelTypeSet, ModelTypeSet)>& ready_task,
- const base::Closure& retry_callback) {
+ ModelTypeConfigurer::ConfigureParams params) {
DCHECK(thread_checker_.CalledOnValidThread());
- DCHECK(!ready_task.is_null());
- DCHECK(!retry_callback.is_null());
- base::Closure chained_ready_task(
- base::Bind(&SyncBackendHostCore::DoFinishConfigureDataTypes,
- weak_ptr_factory_.GetWeakPtr(), to_download, ready_task));
+ DCHECK(!params.ready_task.is_null());
+ DCHECK(!params.retry_callback.is_null());
+
+ registrar_->ConfigureDataTypes(params.enabled_types, params.disabled_types);
+
+ ModelSafeRoutingInfo routing_info;
+ registrar_->GetModelSafeRoutingInfo(&routing_info);
+
+ base::Closure chained_ready_task(base::Bind(
+ &SyncBackendHostCore::DoFinishConfigureDataTypes,
+ weak_ptr_factory_.GetWeakPtr(), params.to_download, params.ready_task));
base::Closure chained_retry_task(
base::Bind(&SyncBackendHostCore::DoRetryConfiguration,
- weak_ptr_factory_.GetWeakPtr(), retry_callback));
- sync_manager_->ConfigureSyncer(reason, to_download, routing_info,
- chained_ready_task, chained_retry_task);
+ weak_ptr_factory_.GetWeakPtr(), params.retry_callback));
+
+ sync_manager_->ConfigureSyncer(params.reason, params.to_download,
+ routing_info, chained_ready_task,
+ chained_retry_task);
}
void SyncBackendHostCore::DoFinishConfigureDataTypes(
« no previous file with comments | « components/sync/driver/glue/sync_backend_host_core.h ('k') | components/sync/driver/glue/sync_backend_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698