| Index: components/sync/driver/non_blocking_data_type_controller.cc
|
| diff --git a/components/sync/driver/non_blocking_data_type_controller.cc b/components/sync/driver/non_blocking_data_type_controller.cc
|
| index aef3e9d63907a4b588d1b7ef6101cf56f7350738..c414de2e7f9126c8522b840731a92545aab71fe4 100644
|
| --- a/components/sync/driver/non_blocking_data_type_controller.cc
|
| +++ b/components/sync/driver/non_blocking_data_type_controller.cc
|
| @@ -131,11 +131,14 @@ void NonBlockingDataTypeController::OnProcessorStarted(
|
| void NonBlockingDataTypeController::RegisterWithBackend(
|
| sync_driver::BackendDataTypeConfigurer* configurer) {
|
| DCHECK(CalledOnValidThread());
|
| + if (activated_)
|
| + return;
|
| DCHECK(configurer);
|
| DCHECK(activation_context_);
|
| DCHECK_EQ(MODEL_LOADED, state_);
|
| configurer->ActivateNonBlockingDataType(type(),
|
| std::move(activation_context_));
|
| + activated_ = true;
|
| }
|
|
|
| void NonBlockingDataTypeController::StartAssociating(
|
| @@ -165,7 +168,9 @@ void NonBlockingDataTypeController::DeactivateDataType(
|
| sync_driver::BackendDataTypeConfigurer* configurer) {
|
| DCHECK(CalledOnValidThread());
|
| DCHECK(configurer);
|
| + DCHECK(activated_);
|
| configurer->DeactivateNonBlockingDataType(type());
|
| + activated_ = false;
|
| }
|
|
|
| void NonBlockingDataTypeController::Stop() {
|
|
|