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

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

Issue 2923363004: [Sync] Migrate bridge implementations to change list based MergeSyncData (Closed)
Patch Set: Created 3 years, 6 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 unified diff | Download patch
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_FAKE_MODEL_TYPE_SYNC_BRIDGE_H_ 5 #ifndef COMPONENTS_SYNC_MODEL_FAKE_MODEL_TYPE_SYNC_BRIDGE_H_
6 #define COMPONENTS_SYNC_MODEL_FAKE_MODEL_TYPE_SYNC_BRIDGE_H_ 6 #define COMPONENTS_SYNC_MODEL_FAKE_MODEL_TYPE_SYNC_BRIDGE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 std::unique_ptr<EntityData> entity_data); 100 std::unique_ptr<EntityData> entity_data);
101 101
102 // Local data deletion. 102 // Local data deletion.
103 void DeleteItem(const std::string& key); 103 void DeleteItem(const std::string& key);
104 104
105 // ModelTypeSyncBridge implementation 105 // ModelTypeSyncBridge implementation
106 std::unique_ptr<MetadataChangeList> CreateMetadataChangeList() override; 106 std::unique_ptr<MetadataChangeList> CreateMetadataChangeList() override;
107 base::Optional<ModelError> MergeSyncData( 107 base::Optional<ModelError> MergeSyncData(
108 std::unique_ptr<MetadataChangeList> metadata_change_list, 108 std::unique_ptr<MetadataChangeList> metadata_change_list,
109 EntityChangeList entity_data) override; 109 EntityChangeList entity_data) override;
110 base::Optional<ModelError> MergeSyncData(
111 std::unique_ptr<MetadataChangeList> metadata_change_list,
112 EntityDataMap entity_data) override;
113 base::Optional<ModelError> ApplySyncChanges( 110 base::Optional<ModelError> ApplySyncChanges(
114 std::unique_ptr<MetadataChangeList> metadata_change_list, 111 std::unique_ptr<MetadataChangeList> metadata_change_list,
115 EntityChangeList entity_changes) override; 112 EntityChangeList entity_changes) override;
116 void GetData(StorageKeyList storage_keys, DataCallback callback) override; 113 void GetData(StorageKeyList storage_keys, DataCallback callback) override;
117 void GetAllData(DataCallback callback) override; 114 void GetAllData(DataCallback callback) override;
118 std::string GetClientTag(const EntityData& entity_data) override; 115 std::string GetClientTag(const EntityData& entity_data) override;
119 std::string GetStorageKey(const EntityData& entity_data) override; 116 std::string GetStorageKey(const EntityData& entity_data) override;
120 bool SupportsGetStorageKey() const override; 117 bool SupportsGetStorageKey() const override;
121 void SetSupportsGetStorageKey(bool supports_get_storage_key); 118 void SetSupportsGetStorageKey(bool supports_get_storage_key);
122 ConflictResolution ResolveConflict( 119 ConflictResolution ResolveConflict(
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 152
156 // Whether the bridge supports call to GetStorageKey. If it doesn't bridge is 153 // Whether the bridge supports call to GetStorageKey. If it doesn't bridge is
157 // responsible for calling UpdateStorageKey when processing new entities in 154 // responsible for calling UpdateStorageKey when processing new entities in
158 // MergeSyncData/ApplySyncChanges. 155 // MergeSyncData/ApplySyncChanges.
159 bool supports_get_storage_key_ = true; 156 bool supports_get_storage_key_ = true;
160 }; 157 };
161 158
162 } // namespace syncer 159 } // namespace syncer
163 160
164 #endif // COMPONENTS_SYNC_MODEL_FAKE_MODEL_TYPE_SYNC_BRIDGE_H_ 161 #endif // COMPONENTS_SYNC_MODEL_FAKE_MODEL_TYPE_SYNC_BRIDGE_H_
OLDNEW
« no previous file with comments | « components/sync/model/entity_data.h ('k') | components/sync/model/fake_model_type_sync_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698