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

Side by Side Diff: components/sync/model/simple_metadata_change_list.h

Issue 2470953002: [Sync] Adding a passthrough MetadataChangeList implementation. (Closed)
Patch Set: Last update for Max. Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « components/sync/BUILD.gn ('k') | components/sync/model/simple_metadata_change_list.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 COMPONENTS_SYNC_MODEL_SIMPLE_METADATA_CHANGE_LIST_H_ 5 #ifndef COMPONENTS_SYNC_MODEL_SIMPLE_METADATA_CHANGE_LIST_H_
6 #define COMPONENTS_SYNC_MODEL_SIMPLE_METADATA_CHANGE_LIST_H_ 6 #define COMPONENTS_SYNC_MODEL_SIMPLE_METADATA_CHANGE_LIST_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 24 matching lines...) Expand all
35 }; 35 };
36 36
37 typedef std::map<std::string, MetadataChange> MetadataChanges; 37 typedef std::map<std::string, MetadataChange> MetadataChanges;
38 38
39 SimpleMetadataChangeList(); 39 SimpleMetadataChangeList();
40 ~SimpleMetadataChangeList() override; 40 ~SimpleMetadataChangeList() override;
41 41
42 void UpdateModelTypeState( 42 void UpdateModelTypeState(
43 const sync_pb::ModelTypeState& model_type_state) override; 43 const sync_pb::ModelTypeState& model_type_state) override;
44 void ClearModelTypeState() override; 44 void ClearModelTypeState() override;
45 void UpdateMetadata(const std::string& client_tag, 45 void UpdateMetadata(const std::string& storage_key,
46 const sync_pb::EntityMetadata& metadata) override; 46 const sync_pb::EntityMetadata& metadata) override;
47 void ClearMetadata(const std::string& client_tag) override; 47 void ClearMetadata(const std::string& storage_key) override;
48 48
49 const MetadataChanges& GetMetadataChanges() const; 49 const MetadataChanges& GetMetadataChanges() const;
50 bool HasModelTypeStateChange() const; 50 bool HasModelTypeStateChange() const;
51 const ModelTypeStateChange& GetModelTypeStateChange() const; 51 const ModelTypeStateChange& GetModelTypeStateChange() const;
52 52
53 // Moves all currently accumulated changes into the write batch, clear out 53 // Moves all currently accumulated changes into the write batch, clear out
54 // local copies. Calling this multiple times will work, but should not be 54 // local copies. Calling this multiple times will work, but should not be
55 // necessary. 55 // necessary.
56 void TransferChanges(ModelTypeStore* store, 56 void TransferChanges(ModelTypeStore* store,
57 ModelTypeStore::WriteBatch* write_batch); 57 ModelTypeStore::WriteBatch* write_batch);
58 58
59 private: 59 private:
60 MetadataChanges metadata_changes_; 60 MetadataChanges metadata_changes_;
61 std::unique_ptr<ModelTypeStateChange> state_change_; 61 std::unique_ptr<ModelTypeStateChange> state_change_;
62 }; 62 };
63 63
64 } // namespace syncer 64 } // namespace syncer
65 65
66 #endif // COMPONENTS_SYNC_MODEL_SIMPLE_METADATA_CHANGE_LIST_H_ 66 #endif // COMPONENTS_SYNC_MODEL_SIMPLE_METADATA_CHANGE_LIST_H_
OLDNEW
« no previous file with comments | « components/sync/BUILD.gn ('k') | components/sync/model/simple_metadata_change_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698