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/data_batch_impl.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/api/model_type_service.h ('k') | components/sync/core/data_batch_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/core/data_batch_impl.h
diff --git a/components/sync/core/data_batch_impl.h b/components/sync/core/data_batch_impl.h
index ad1f73ddd24daa72568f4aaecb80e80c09b74f05..1e5dad8c8180e1e77ccd27f5bd035c4c76223044 100644
--- a/components/sync/core/data_batch_impl.h
+++ b/components/sync/core/data_batch_impl.h
@@ -21,25 +21,25 @@ namespace syncer_v2 {
// An implementation of DataBatch that's purpose is to transfer ownership of
// EntityData objects. As soon as this batch recieves the EntityData, it owns
// them until Next() is invoked, when it gives up ownerhsip. Because a vector
-// is used internally, this impl is unaware when duplcate client_tags are used,
+// is used internally, this impl is unaware when duplcate storage_keys are used,
// and it is the caller's job to avoid this.
class SYNC_EXPORT DataBatchImpl : public DataBatch {
public:
DataBatchImpl();
~DataBatchImpl() override;
- // Takes ownership of the data tied to a given tag used for storage. Put
- // should be called at most once for any given client_tag. Data will be
+ // Takes ownership of the data tied to a given key used for storage. Put
+ // should be called at most once for any given storfage_key. Data will be
// readable in the same order that they are put into the batch.
- void Put(const std::string& client_tag,
+ void Put(const std::string& storage_key,
std::unique_ptr<EntityData> entity_data);
// DataBatch implementation.
bool HasNext() const override;
- TagAndData Next() override;
+ KeyAndData Next() override;
private:
- std::vector<TagAndData> tag_data_pairs_;
+ std::vector<KeyAndData> key_data_pairs_;
size_t read_index_ = 0;
DISALLOW_COPY_AND_ASSIGN(DataBatchImpl);
« no previous file with comments | « components/sync/api/model_type_service.h ('k') | components/sync/core/data_batch_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698