OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_IMPL_IN_MEMORY_METADATA_CHANGE_LIST_H_ | 5 #ifndef COMPONENTS_SYNC_MODEL_IMPL_IN_MEMORY_METADATA_CHANGE_LIST_H_ |
6 #define COMPONENTS_SYNC_MODEL_IMPL_IN_MEMORY_METADATA_CHANGE_LIST_H_ | 6 #define COMPONENTS_SYNC_MODEL_IMPL_IN_MEMORY_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 23 matching lines...) Expand all Loading... |
34 | 34 |
35 ~InMemoryMetadataChangeList() override; | 35 ~InMemoryMetadataChangeList() override; |
36 | 36 |
37 // MetadataChangeList implementation. | 37 // MetadataChangeList implementation. |
38 void UpdateModelTypeState( | 38 void UpdateModelTypeState( |
39 const sync_pb::ModelTypeState& model_type_state) override; | 39 const sync_pb::ModelTypeState& model_type_state) override; |
40 void ClearModelTypeState() override; | 40 void ClearModelTypeState() override; |
41 void UpdateMetadata(const std::string& storage_key, | 41 void UpdateMetadata(const std::string& storage_key, |
42 const sync_pb::EntityMetadata& metadata) override; | 42 const sync_pb::EntityMetadata& metadata) override; |
43 void ClearMetadata(const std::string& storage_key) override; | 43 void ClearMetadata(const std::string& storage_key) override; |
| 44 base::Optional<syncer::ModelError> TakeError() override; |
44 | 45 |
45 protected: | 46 protected: |
46 // Protected because this class is useless to instantiate directly. | 47 // Protected because this class is useless to instantiate directly. |
47 InMemoryMetadataChangeList(); | 48 InMemoryMetadataChangeList(); |
48 | 49 |
49 std::map<std::string, MetadataChange> metadata_changes_; | 50 std::map<std::string, MetadataChange> metadata_changes_; |
50 std::unique_ptr<ModelTypeStateChange> state_change_; | 51 std::unique_ptr<ModelTypeStateChange> state_change_; |
51 }; | 52 }; |
52 | 53 |
53 } // namespace syncer | 54 } // namespace syncer |
54 | 55 |
55 #endif // COMPONENTS_SYNC_MODEL_IMPL_IN_MEMORY_METADATA_CHANGE_LIST_H_ | 56 #endif // COMPONENTS_SYNC_MODEL_IMPL_IN_MEMORY_METADATA_CHANGE_LIST_H_ |
OLD | NEW |