| Index: sync/internal_api/shared_model_type_processor.cc
|
| diff --git a/sync/internal_api/shared_model_type_processor.cc b/sync/internal_api/shared_model_type_processor.cc
|
| index db511dfa4309c09518f9275a44f0ab1d204a6e22..97cf8e5c7a72b2fbf70959911561b80cf5c00072 100644
|
| --- a/sync/internal_api/shared_model_type_processor.cc
|
| +++ b/sync/internal_api/shared_model_type_processor.cc
|
| @@ -69,15 +69,16 @@ void ModelTypeProcessorProxy::OnUpdateReceived(
|
|
|
| } // namespace
|
|
|
| -SharedModelTypeProcessor::SharedModelTypeProcessor(
|
| - syncer::ModelType type,
|
| - base::WeakPtr<ModelTypeStore> store)
|
| +SharedModelTypeProcessor::SharedModelTypeProcessor(syncer::ModelType type,
|
| + ModelTypeService* service)
|
| : type_(type),
|
| is_enabled_(false),
|
| is_connected_(false),
|
| - store_(store),
|
| + service_(service),
|
| weak_ptr_factory_for_ui_(this),
|
| - weak_ptr_factory_for_sync_(this) {}
|
| + weak_ptr_factory_for_sync_(this) {
|
| + DCHECK(service);
|
| +}
|
|
|
| SharedModelTypeProcessor::~SharedModelTypeProcessor() {}
|
|
|
| @@ -272,8 +273,8 @@ void SharedModelTypeProcessor::OnUpdateReceived(
|
| ModelTypeEntity* entity = nullptr;
|
| EntityMap::const_iterator it = entities_.find(client_tag_hash);
|
| if (it == entities_.end()) {
|
| - // TODO(stanisc): crbug/561821: Get client_tag from the service.
|
| - std::string client_tag = client_tag_hash;
|
| + // Let the service define |client_tag| based on the entity data.
|
| + std::string client_tag = service_->GetClientTag(data);
|
|
|
| scoped_ptr<ModelTypeEntity> scoped_entity = ModelTypeEntity::CreateNew(
|
| client_tag, client_tag_hash, data.id, data.creation_time);
|
|
|