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

Side by Side Diff: sync/api/model_type_service.h

Issue 1565503003: Use MetadataChangeList and EntityChangeList in SharedModelTypeProcessor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added ClearDataTypeState Created 4 years, 11 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
« no previous file with comments | « sync/api/metadata_change_list.h ('k') | sync/internal_api/public/shared_model_type_processor.h » ('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 SYNC_API_MODEL_TYPE_SERVICE_H_ 5 #ifndef SYNC_API_MODEL_TYPE_SERVICE_H_
6 #define SYNC_API_MODEL_TYPE_SERVICE_H_ 6 #define SYNC_API_MODEL_TYPE_SERVICE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 30 matching lines...) Expand all
41 // model type store. 41 // model type store.
42 virtual scoped_ptr<MetadataChangeList> CreateMetadataChangeList() = 0; 42 virtual scoped_ptr<MetadataChangeList> CreateMetadataChangeList() = 0;
43 43
44 // Perform the initial merge of data from the sync server. Should only need 44 // Perform the initial merge of data from the sync server. Should only need
45 // to be called when sync is first turned on, not on every restart. 45 // to be called when sync is first turned on, not on every restart.
46 virtual syncer::SyncError MergeSyncData( 46 virtual syncer::SyncError MergeSyncData(
47 scoped_ptr<MetadataChangeList> metadata_change_list, 47 scoped_ptr<MetadataChangeList> metadata_change_list,
48 EntityDataList entity_data_list) = 0; 48 EntityDataList entity_data_list) = 0;
49 49
50 // Apply changes from the sync server locally. 50 // Apply changes from the sync server locally.
51 // Please note that |entity_changes| might have fewer entries than
52 // |metadata_change_list| in case when some of the data changes are filtered
53 // out, or even be empty in case when a commit confirmation is processed and
54 // only the metadata needs to persisted.
51 virtual syncer::SyncError ApplySyncChanges( 55 virtual syncer::SyncError ApplySyncChanges(
52 scoped_ptr<MetadataChangeList> metadata_change_list, 56 scoped_ptr<MetadataChangeList> metadata_change_list,
53 EntityChangeList entity_changes) = 0; 57 EntityChangeList entity_changes) = 0;
54 58
55 // Asynchronously retrieve the sync metadata. 59 // Asynchronously retrieve the sync metadata.
56 virtual void LoadMetadata(MetadataCallback callback) = 0; 60 virtual void LoadMetadata(MetadataCallback callback) = 0;
57 61
58 // Asynchronously retrieve the corresponding sync data for |client_keys|. 62 // Asynchronously retrieve the corresponding sync data for |client_keys|.
59 virtual void GetData(ClientKeyList client_keys, DataCallback callback) = 0; 63 virtual void GetData(ClientKeyList client_keys, DataCallback callback) = 0;
60 64
(...skipping 12 matching lines...) Expand all
73 void clear_change_processor(); 77 void clear_change_processor();
74 78
75 private: 79 private:
76 // Recieves ownership in set_change_processor(...). 80 // Recieves ownership in set_change_processor(...).
77 scoped_ptr<syncer_v2::ModelTypeChangeProcessor> change_processor_; 81 scoped_ptr<syncer_v2::ModelTypeChangeProcessor> change_processor_;
78 }; 82 };
79 83
80 } // namespace syncer_v2 84 } // namespace syncer_v2
81 85
82 #endif // SYNC_API_MODEL_TYPE_SERVICE_H_ 86 #endif // SYNC_API_MODEL_TYPE_SERVICE_H_
OLDNEW
« no previous file with comments | « sync/api/metadata_change_list.h ('k') | sync/internal_api/public/shared_model_type_processor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698