OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef SYNC_API_METADATA_CHANGE_LIST_H_ | 5 #ifndef SYNC_API_METADATA_CHANGE_LIST_H_ |
6 #define SYNC_API_METADATA_CHANGE_LIST_H_ | 6 #define SYNC_API_METADATA_CHANGE_LIST_H_ |
7 | 7 |
8 #include <string> | |
9 | |
8 #include "sync/base/sync_export.h" | 10 #include "sync/base/sync_export.h" |
9 | 11 |
12 namespace sync_pb { | |
13 class EntityMetadata; | |
14 } // namespace sync_pb | |
15 | |
10 namespace syncer_v2 { | 16 namespace syncer_v2 { |
17 struct DataTypeState; | |
11 | 18 |
12 // Interface used by the processor and service to communicate about metadata. | 19 // Interface used by the processor and service to communicate about metadata. |
13 class SYNC_EXPORT MetadataChangeList { | 20 class SYNC_EXPORT MetadataChangeList { |
14 public: | 21 public: |
15 MetadataChangeList() {} | 22 MetadataChangeList() {} |
16 virtual ~MetadataChangeList() {} | 23 virtual ~MetadataChangeList() {} |
24 | |
25 // 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.
| |
26 virtual void UpdateDataTypeState(const DataTypeState& data_type_state); | |
27 | |
28 // Requests metadata entry to be updated in the storage. | |
29 // Please note that the update might contain a deleted entry if | |
30 // metadata.is_deleted() is true (as opposed to clearing the entry from the | |
31 // storage completely by calling the Clear method). | |
32 // 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.
| |
33 virtual void UpdateMetadata(const std::string& client_tag, | |
34 const sync_pb::EntityMetadata& metadata) = 0; | |
35 | |
36 // Requests metadata entry to be cleared from the storage. | |
37 virtual void ClearMetadata(const std::string& client_tag) = 0; | |
17 }; | 38 }; |
18 | 39 |
19 } // namespace syncer_v2 | 40 } // namespace syncer_v2 |
20 | 41 |
21 #endif // SYNC_API_METADATA_CHANGE_LIST_H_ | 42 #endif // SYNC_API_METADATA_CHANGE_LIST_H_ |
OLD | NEW |