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

Unified Diff: sync/api/metadata_change_list.h

Issue 1565503003: Use MetadataChangeList and EntityChangeList in SharedModelTypeProcessor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
Index: sync/api/metadata_change_list.h
diff --git a/sync/api/metadata_change_list.h b/sync/api/metadata_change_list.h
index e4435a83f386f75dc8ad380d29b6ae9854899b18..17b2bd6da24daa99ad373067afa7b4723e594c8f 100644
--- a/sync/api/metadata_change_list.h
+++ b/sync/api/metadata_change_list.h
@@ -5,15 +5,36 @@
#ifndef SYNC_API_METADATA_CHANGE_LIST_H_
#define SYNC_API_METADATA_CHANGE_LIST_H_
+#include <string>
+
#include "sync/base/sync_export.h"
+namespace sync_pb {
+class EntityMetadata;
+} // namespace sync_pb
+
namespace syncer_v2 {
+struct DataTypeState;
// Interface used by the processor and service to communicate about metadata.
class SYNC_EXPORT MetadataChangeList {
public:
MetadataChangeList() {}
virtual ~MetadataChangeList() {}
+
+ // Requests DataTypeState to be updated in the storage.
skym 2016/01/07 00:40:48 Should we be able to clear the DTS as well?
stanisc 2016/01/11 19:56:47 I guess clearing DTS is equivalent to replacing it
skym 2016/01/11 20:45:40 I guess my problem here is that this interface is
stanisc 2016/01/12 19:32:11 OK, I've added ClearDataTypeState.
+ virtual void UpdateDataTypeState(const DataTypeState& data_type_state);
+
+ // Requests metadata entry to be updated in the storage.
+ // Please note that the update might contain a deleted entry if
+ // metadata.is_deleted() is true (as opposed to clearing the entry from the
+ // storage completely by calling the Clear method).
+ // Please note that update requests for the same entry are coalesced.
skym 2016/01/07 00:40:48 What does 'entry' mean? What does 'coalesced' mean
stanisc 2016/01/11 19:56:47 What I tried to say that multiple updates with the
skym 2016/01/11 20:45:40 I lean towards being explicit about how the implem
stanisc 2016/01/12 19:32:11 Done.
+ virtual void UpdateMetadata(const std::string& client_tag,
+ const sync_pb::EntityMetadata& metadata) = 0;
+
+ // Requests metadata entry to be cleared from the storage.
+ virtual void ClearMetadata(const std::string& client_tag) = 0;
};
} // namespace syncer_v2

Powered by Google App Engine
This is Rietveld 408576698