Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: components/sync/core/processor_entity_tracker.h

Issue 2222373003: [Sync] Adding storage key concept for ModelTypeServices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing redundant hash value. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/sync/core/data_batch_impl_unittest.cc ('k') | components/sync/core/processor_entity_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/core/processor_entity_tracker.h
diff --git a/components/sync/core/processor_entity_tracker.h b/components/sync/core/processor_entity_tracker.h
index 1a6d3f825a9038cb4673290a3c69a1aa9de9a496..38f2c0f3337ad0538ac79d57cb8453e106e17189 100644
--- a/components/sync/core/processor_entity_tracker.h
+++ b/components/sync/core/processor_entity_tracker.h
@@ -28,7 +28,7 @@ class SYNC_EXPORT ProcessorEntityTracker {
public:
// Construct an instance representing a new locally-created item.
static std::unique_ptr<ProcessorEntityTracker> CreateNew(
- const std::string& client_tag,
+ const std::string& storage_key,
const std::string& client_tag_hash,
const std::string& id,
base::Time creation_time);
@@ -36,12 +36,12 @@ class SYNC_EXPORT ProcessorEntityTracker {
// Construct an instance representing an item loaded from storage on init.
// This method swaps out the contents of |metadata|.
static std::unique_ptr<ProcessorEntityTracker> CreateFromMetadata(
- const std::string& client_tag,
+ const std::string& storage_key,
sync_pb::EntityMetadata* metadata);
~ProcessorEntityTracker();
- const std::string& client_tag() const { return client_tag_; }
+ const std::string& storage_key() const { return storage_key_; }
const sync_pb::EntityMetadata& metadata() const { return metadata_; }
const EntityDataPtr& commit_data() const { return commit_data_; }
@@ -126,7 +126,7 @@ class SYNC_EXPORT ProcessorEntityTracker {
friend class ProcessorEntityTrackerTest;
// The constructor swaps the data from the passed metadata.
- ProcessorEntityTracker(const std::string& client_tag,
+ ProcessorEntityTracker(const std::string& storage_key,
sync_pb::EntityMetadata* metadata);
// Check whether |specifics| matches the stored specifics_hash.
@@ -135,8 +135,8 @@ class SYNC_EXPORT ProcessorEntityTracker {
// Update hash string for EntitySpecifics in the metadata.
void UpdateSpecificsHash(const sync_pb::EntitySpecifics& specifics);
- // Client tag. Should always be available.
- std::string client_tag_;
+ // Storage key. Should always be available.
+ const std::string storage_key_;
// Serializable Sync metadata.
sync_pb::EntityMetadata metadata_;
« no previous file with comments | « components/sync/core/data_batch_impl_unittest.cc ('k') | components/sync/core/processor_entity_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698