| Index: components/sync/model_impl/shared_model_type_processor.cc
|
| diff --git a/components/sync/model_impl/shared_model_type_processor.cc b/components/sync/model_impl/shared_model_type_processor.cc
|
| index 9aac0477bc9a843eb2ce94cf5da9f6a738e76b62..06d0a1a99d0d9d035fe5fa8f2e370dbc6c41990a 100644
|
| --- a/components/sync/model_impl/shared_model_type_processor.cc
|
| +++ b/components/sync/model_impl/shared_model_type_processor.cc
|
| @@ -106,7 +106,7 @@ void SharedModelTypeProcessor::ConnectIfReady() {
|
| std::unique_ptr<ActivationContext> activation_context;
|
|
|
| if (!start_error_.IsSet()) {
|
| - activation_context = base::WrapUnique(new ActivationContext);
|
| + activation_context = base::MakeUnique<ActivationContext>();
|
| activation_context->model_type_state = model_type_state_;
|
| activation_context->type_processor =
|
| base::MakeUnique<ModelTypeProcessorProxy>(
|
| @@ -129,6 +129,7 @@ bool SharedModelTypeProcessor::IsConnected() const {
|
|
|
| void SharedModelTypeProcessor::DisableSync() {
|
| DCHECK(CalledOnValidThread());
|
| + DCHECK(is_metadata_loaded_);
|
| std::unique_ptr<MetadataChangeList> change_list =
|
| service_->CreateMetadataChangeList();
|
| for (auto it = entities_.begin(); it != entities_.end(); ++it) {
|
| @@ -139,6 +140,10 @@ void SharedModelTypeProcessor::DisableSync() {
|
| service_->ApplySyncChanges(std::move(change_list), EntityChangeList());
|
| }
|
|
|
| +bool SharedModelTypeProcessor::IsTrackingMetadata() {
|
| + return model_type_state_.initial_sync_done();
|
| +}
|
| +
|
| SyncError SharedModelTypeProcessor::CreateAndUploadError(
|
| const tracked_objects::Location& location,
|
| const std::string& message) {
|
|
|