Chromium Code Reviews| 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 b9345444f8770a596ae2595efba5424432210e99..ccb7b84b9c711a01efa609633e7ea9acf3299af1 100644 |
| --- a/components/sync/driver/glue/sync_backend_host_core.cc |
| +++ b/components/sync/driver/glue/sync_backend_host_core.cc |
| @@ -141,6 +141,15 @@ void SyncBackendHostCore::OnInitializationComplete( |
| ModelTypeSet new_control_types = |
| registrar_->ConfigureDataTypes(ControlTypes(), ModelTypeSet()); |
| + |
| + // Control types don't have DataTypeControllers, but they need to have |
| + // update handlers registerd in ModelTypeRegistry. Register them here. |
|
maxbogue
2017/01/18 01:24:11
registered
pavely
2017/01/18 20:18:07
Done.
|
| + auto model_type_connector = sync_manager_->GetModelTypeConnectorProxy(); |
|
maxbogue
2017/01/18 01:24:11
I think you should probably just have an accessor
pavely
2017/01/18 20:18:07
Done.
|
| + ModelTypeSet control_types = ControlTypes(); |
| + for (auto it = control_types.First(); it.Good(); it.Inc()) { |
| + model_type_connector->RegisterDirectoryType(it.Get(), GROUP_PASSIVE); |
| + } |
| + |
| ModelSafeRoutingInfo routing_info; |
| registrar_->GetModelSafeRoutingInfo(&routing_info); |
| SDVLOG(1) << "Control Types " << ModelTypeSetToString(new_control_types) |
| @@ -152,7 +161,7 @@ void SyncBackendHostCore::OnInitializationComplete( |
| sync_manager_->PurgeDisabledTypes(types_to_purge, ModelTypeSet(), |
| ModelTypeSet()); |
| sync_manager_->ConfigureSyncer( |
| - reason, new_control_types, routing_info, |
| + reason, new_control_types, |
| base::Bind(&SyncBackendHostCore::DoInitialProcessControlTypes, |
| weak_ptr_factory_.GetWeakPtr()), |
| base::Closure()); |
| @@ -389,11 +398,13 @@ void SyncBackendHostCore::DoUpdateCredentials( |
| } |
| } |
| -void SyncBackendHostCore::DoStartSyncing( |
| - const ModelSafeRoutingInfo& routing_info, |
| - base::Time last_poll_time) { |
| +void SyncBackendHostCore::DoStartConfiguration() { |
| + sync_manager_->StartConfiguration(); |
| +} |
| + |
| +void SyncBackendHostCore::DoStartSyncing(base::Time last_poll_time) { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| - sync_manager_->StartSyncingNormally(routing_info, last_poll_time); |
| + sync_manager_->StartSyncingNormally(last_poll_time); |
| } |
| void SyncBackendHostCore::DoSetEncryptionPassphrase( |
| @@ -515,9 +526,6 @@ void SyncBackendHostCore::DoConfigureSyncer( |
| 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)); |
| @@ -526,8 +534,7 @@ void SyncBackendHostCore::DoConfigureSyncer( |
| weak_ptr_factory_.GetWeakPtr(), params.retry_callback)); |
| sync_manager_->ConfigureSyncer(params.reason, params.to_download, |
| - routing_info, chained_ready_task, |
| - chained_retry_task); |
| + chained_ready_task, chained_retry_task); |
| } |
| void SyncBackendHostCore::DoFinishConfigureDataTypes( |