| Index: components/sync/driver/model_type_controller.cc
|
| diff --git a/components/sync/driver/model_type_controller.cc b/components/sync/driver/model_type_controller.cc
|
| index 9dbe973ef1c717670f6a676dc7c1f18b998bbee5..bb93d04978420be740b4c4069564649d927c35c0 100644
|
| --- a/components/sync/driver/model_type_controller.cc
|
| +++ b/components/sync/driver/model_type_controller.cc
|
| @@ -159,13 +159,19 @@ void ModelTypeController::OnProcessorStarted(
|
| LoadModelsDone(result, error);
|
| }
|
|
|
| -void ModelTypeController::RegisterWithBackend(ModelTypeConfigurer* configurer) {
|
| +void ModelTypeController::RegisterWithBackend(
|
| + base::Callback<void(bool)> set_downloaded,
|
| + ModelTypeConfigurer* configurer) {
|
| DCHECK(CalledOnValidThread());
|
| if (activated_)
|
| return;
|
| DCHECK(configurer);
|
| DCHECK(activation_context_);
|
| DCHECK_EQ(MODEL_LOADED, state_);
|
| + // Inform the DataTypeManager whether our initial download is complete.
|
| + set_downloaded.Run(activation_context_->model_type_state.initial_sync_done());
|
| + // Pass activation context to ModelTypeRegistry, where ModelTypeWorker gets
|
| + // created and connected with ModelTypeProcessor.
|
| configurer->ActivateNonBlockingDataType(type(),
|
| std::move(activation_context_));
|
| activated_ = true;
|
|
|