OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_SYNC_GLUE_GENERIC_CHANGE_PROCESSOR_H_ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_GENERIC_CHANGE_PROCESSOR_H_ |
6 #define CHROME_BROWSER_SYNC_GLUE_GENERIC_CHANGE_PROCESSOR_H_ | 6 #define CHROME_BROWSER_SYNC_GLUE_GENERIC_CHANGE_PROCESSOR_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
55 const syncer::ImmutableChangeRecordList& changes) OVERRIDE; | 55 const syncer::ImmutableChangeRecordList& changes) OVERRIDE; |
56 // Passes |syncer_changes_|, built in ApplyChangesFromSyncModel, onto | 56 // Passes |syncer_changes_|, built in ApplyChangesFromSyncModel, onto |
57 // |local_service_| by way of its ProcessSyncChanges method. | 57 // |local_service_| by way of its ProcessSyncChanges method. |
58 virtual void CommitChangesFromSyncModel() OVERRIDE; | 58 virtual void CommitChangesFromSyncModel() OVERRIDE; |
59 | 59 |
60 // syncer::SyncChangeProcessor implementation. | 60 // syncer::SyncChangeProcessor implementation. |
61 virtual syncer::SyncError ProcessSyncChanges( | 61 virtual syncer::SyncError ProcessSyncChanges( |
62 const tracked_objects::Location& from_here, | 62 const tracked_objects::Location& from_here, |
63 const syncer::SyncChangeList& change_list) OVERRIDE; | 63 const syncer::SyncChangeList& change_list) OVERRIDE; |
64 | 64 |
65 // Fills a list of SyncData. This should create an up to date representation | |
66 // of all the data known to the ChangeProcessor for |datatype|, and | |
67 // should match/be a subset of the server's view of that datatype. | |
68 virtual syncer::SyncDataList GetAllSyncData(syncer::ModelType type) | |
haitaol1
2013/08/19 21:20:06
This seems redundant with GetSyncDataForType().
tim (not reviewing)
2013/09/04 23:47:56
I went back and forth between a few options here.
| |
69 const OVERRIDE; | |
70 | |
65 // Fills |current_sync_data| with all the syncer data for the specified type. | 71 // Fills |current_sync_data| with all the syncer data for the specified type. |
66 virtual syncer::SyncError GetSyncDataForType( | 72 virtual syncer::SyncError GetSyncDataForType( |
67 syncer::ModelType type, | 73 syncer::ModelType type, |
68 syncer::SyncDataList* current_sync_data); | 74 syncer::SyncDataList* current_sync_data) const; |
69 | 75 |
70 // Returns the number of items for this type. | 76 // Returns the number of items for this type. |
71 virtual int GetSyncCountForType(syncer::ModelType type); | 77 virtual int GetSyncCountForType(syncer::ModelType type); |
72 | 78 |
73 // Generic versions of AssociatorInterface methods. Called by | 79 // Generic versions of AssociatorInterface methods. Called by |
74 // syncer::SyncableServiceAdapter or the DataTypeController. | 80 // syncer::SyncableServiceAdapter or the DataTypeController. |
75 virtual bool SyncModelHasUserCreatedNodes(syncer::ModelType type, | 81 virtual bool SyncModelHasUserCreatedNodes(syncer::ModelType type, |
76 bool* has_nodes); | 82 bool* has_nodes); |
77 virtual bool CryptoReadyIfNecessary(syncer::ModelType type); | 83 virtual bool CryptoReadyIfNecessary(syncer::ModelType type); |
78 | 84 |
(...skipping 24 matching lines...) Expand all Loading... | |
103 // when it starts up). As such we can't wait until Start(_) has been called, | 109 // when it starts up). As such we can't wait until Start(_) has been called, |
104 // and have to keep a local pointer to the user_share. | 110 // and have to keep a local pointer to the user_share. |
105 syncer::UserShare* const share_handle_; | 111 syncer::UserShare* const share_handle_; |
106 | 112 |
107 DISALLOW_COPY_AND_ASSIGN(GenericChangeProcessor); | 113 DISALLOW_COPY_AND_ASSIGN(GenericChangeProcessor); |
108 }; | 114 }; |
109 | 115 |
110 } // namespace browser_sync | 116 } // namespace browser_sync |
111 | 117 |
112 #endif // CHROME_BROWSER_SYNC_GLUE_GENERIC_CHANGE_PROCESSOR_H_ | 118 #endif // CHROME_BROWSER_SYNC_GLUE_GENERIC_CHANGE_PROCESSOR_H_ |
OLD | NEW |