summaryrefslogtreecommitdiffstats
path: root/sync/internal_api/public/shared_model_type_processor.h
diff options
context:
space:
mode:
authormaxbogue <maxbogue@chromium.org>2016-02-29 16:56:18 -0800
committerCommit bot <commit-bot@chromium.org>2016-03-01 00:57:45 +0000
commit477627459af8b4350b2a6d9e1ff322aa936f8a54 (patch)
tree28b4cead50292ec917451c961f5acd6275eca520 /sync/internal_api/public/shared_model_type_processor.h
parentca4f3f8c59ead5bdf1957eedb3be3c4152440a69 (diff)
downloadchromium_src-477627459af8b4350b2a6d9e1ff322aa936f8a54.zip
chromium_src-477627459af8b4350b2a6d9e1ff322aa936f8a54.tar.gz
chromium_src-477627459af8b4350b2a6d9e1ff322aa936f8a54.tar.bz2
[Sync] Rename to (Processor|Worker)EntityTracker for clarity.
The names ModelTypeEntity and EntityTracker did not express the purposes and the similarities between the classes well. They are each essentially internal to their respective components, and they each handle the logic of tracking what's necessary for an entity in that component. I think these names are much clearer. Review URL: https://codereview.chromium.org/1739423002 Cr-Commit-Position: refs/heads/master@{#378348}
Diffstat (limited to 'sync/internal_api/public/shared_model_type_processor.h')
-rw-r--r--sync/internal_api/public/shared_model_type_processor.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/sync/internal_api/public/shared_model_type_processor.h b/sync/internal_api/public/shared_model_type_processor.h
index 7ca4572..db20870 100644
--- a/sync/internal_api/public/shared_model_type_processor.h
+++ b/sync/internal_api/public/shared_model_type_processor.h
@@ -27,7 +27,7 @@
namespace syncer_v2 {
struct ActivationContext;
class CommitQueue;
-class ModelTypeEntity;
+class ProcessorEntityTracker;
// A sync component embedded on the synced type's thread that helps to handle
// communication between sync and model type threads.
@@ -87,7 +87,7 @@ class SYNC_EXPORT SharedModelTypeProcessor : public ModelTypeProcessor,
private:
friend class SharedModelTypeProcessorTest;
- using EntityMap = std::map<std::string, scoped_ptr<ModelTypeEntity>>;
+ using EntityMap = std::map<std::string, scoped_ptr<ProcessorEntityTracker>>;
using UpdateMap = std::map<std::string, scoped_ptr<UpdateResponseData>>;
// Callback for ModelTypeService::GetData(). Used when we need to load data
@@ -108,17 +108,18 @@ class SYNC_EXPORT SharedModelTypeProcessor : public ModelTypeProcessor,
std::string GetHashForTag(const std::string& tag);
// Gets the entity for the given tag, or null if there isn't one.
- ModelTypeEntity* GetEntityForTag(const std::string& tag);
+ ProcessorEntityTracker* GetEntityForTag(const std::string& tag);
// Gets the entity for the given tag hash, or null if there isn't one.
- ModelTypeEntity* GetEntityForTagHash(const std::string& tag_hash);
+ ProcessorEntityTracker* GetEntityForTagHash(const std::string& tag_hash);
// Create an entity in the entity map for |tag| and return a pointer to it.
// Requires that no entity for |tag| already exists in the map.
- ModelTypeEntity* CreateEntity(const std::string& tag, const EntityData& data);
+ ProcessorEntityTracker* CreateEntity(const std::string& tag,
+ const EntityData& data);
// Version of the above that generates a tag for |data|.
- ModelTypeEntity* CreateEntity(const EntityData& data);
+ ProcessorEntityTracker* CreateEntity(const EntityData& data);
syncer::ModelType type_;
sync_pb::DataTypeState data_type_state_;