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

Side by Side Diff: components/sync/model/stub_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_STUB_MODEL_TYPE_SYNC_BRIDGE_H_ 5 #ifndef COMPONENTS_SYNC_MODEL_STUB_MODEL_TYPE_SYNC_BRIDGE_H_
6 #define COMPONENTS_SYNC_MODEL_STUB_MODEL_TYPE_SYNC_BRIDGE_H_ 6 #define COMPONENTS_SYNC_MODEL_STUB_MODEL_TYPE_SYNC_BRIDGE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "base/optional.h" 11 #include "base/optional.h"
12 #include "components/sync/model/model_type_sync_bridge.h" 12 #include "components/sync/model/model_type_sync_bridge.h"
13 13
14 namespace syncer { 14 namespace syncer {
15 15
16 // A non-functional implementation of ModelTypeSyncBridge for 16 // A non-functional implementation of ModelTypeSyncBridge for
17 // testing purposes. 17 // testing purposes.
18 class StubModelTypeSyncBridge : public ModelTypeSyncBridge { 18 class StubModelTypeSyncBridge : public ModelTypeSyncBridge {
19 public: 19 public:
20 StubModelTypeSyncBridge(); 20 StubModelTypeSyncBridge();
21 explicit StubModelTypeSyncBridge( 21 explicit StubModelTypeSyncBridge(
22 const ChangeProcessorFactory& change_processor_factory); 22 const ChangeProcessorFactory& change_processor_factory);
23 ~StubModelTypeSyncBridge() override; 23 ~StubModelTypeSyncBridge() override;
24 24
25 std::unique_ptr<MetadataChangeList> CreateMetadataChangeList() override; 25 std::unique_ptr<MetadataChangeList> CreateMetadataChangeList() override;
26 base::Optional<ModelError> MergeSyncData( 26 base::Optional<ModelError> MergeSyncData(
27 std::unique_ptr<MetadataChangeList> metadata_change_list, 27 std::unique_ptr<MetadataChangeList> metadata_change_list,
28 EntityDataMap entity_data_map) override; 28 EntityChangeList entity_data) override;
29 base::Optional<ModelError> ApplySyncChanges( 29 base::Optional<ModelError> ApplySyncChanges(
30 std::unique_ptr<MetadataChangeList> metadata_change_list, 30 std::unique_ptr<MetadataChangeList> metadata_change_list,
31 EntityChangeList entity_changes) override; 31 EntityChangeList entity_changes) override;
32 void GetData(StorageKeyList storage_keys, DataCallback callback) override; 32 void GetData(StorageKeyList storage_keys, DataCallback callback) override;
33 void GetAllData(DataCallback callback) override; 33 void GetAllData(DataCallback callback) override;
34 std::string GetClientTag(const EntityData& entity_data) override; 34 std::string GetClientTag(const EntityData& entity_data) override;
35 std::string GetStorageKey(const EntityData& entity_data) override; 35 std::string GetStorageKey(const EntityData& entity_data) override;
36 }; 36 };
37 37
38 } // namespace syncer 38 } // namespace syncer
39 39
40 #endif // COMPONENTS_SYNC_MODEL_STUB_MODEL_TYPE_SYNC_BRIDGE_H_ 40 #endif // COMPONENTS_SYNC_MODEL_STUB_MODEL_TYPE_SYNC_BRIDGE_H_
OLDNEW
« no previous file with comments | « components/sync/model/model_type_sync_bridge.cc ('k') | components/sync/model/stub_model_type_sync_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698