OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 // Build and store a list of all changes into |syncer_changes_|. | 38 // Build and store a list of all changes into |syncer_changes_|. |
39 virtual void ApplyChangesFromSyncModel( | 39 virtual void ApplyChangesFromSyncModel( |
40 const sync_api::BaseTransaction* trans, | 40 const sync_api::BaseTransaction* trans, |
41 const sync_api::SyncManager::ChangeRecord* changes, | 41 const sync_api::SyncManager::ChangeRecord* changes, |
42 int change_count) OVERRIDE; | 42 int change_count) OVERRIDE; |
43 // Passes |syncer_changes_|, built in ApplyChangesFromSyncModel, onto | 43 // Passes |syncer_changes_|, built in ApplyChangesFromSyncModel, onto |
44 // |local_service_| by way of it's ProcessSyncChanges method. | 44 // |local_service_| by way of it's ProcessSyncChanges method. |
45 virtual void CommitChangesFromSyncModel() OVERRIDE; | 45 virtual void CommitChangesFromSyncModel() OVERRIDE; |
46 | 46 |
47 // SyncChangeProcessor implementation. | 47 // SyncChangeProcessor implementation. |
48 virtual SyncError ProcessSyncChanges( | 48 virtual void ProcessSyncChanges(const tracked_objects::Location& from_here, |
49 const tracked_objects::Location& from_here, | 49 const SyncChangeList& change_list) OVERRIDE; |
50 const SyncChangeList& change_list) OVERRIDE; | |
51 | 50 |
52 // Fills |current_sync_data| with all the syncer data for the specified type. | 51 // Fills |current_sync_data| with all the syncer data for the specified type. |
53 virtual SyncError GetSyncDataForType(syncable::ModelType type, | 52 virtual bool GetSyncDataForType(syncable::ModelType type, |
54 SyncDataList* current_sync_data); | 53 SyncDataList* current_sync_data); |
55 | 54 |
56 // Generic versions of AssociatorInterface methods. Called by | 55 // Generic versions of AssociatorInterface methods. Called by |
57 // SyncableServiceAdapter. | 56 // SyncableServiceAdapter. |
58 bool SyncModelHasUserCreatedNodes(syncable::ModelType type, | 57 bool SyncModelHasUserCreatedNodes(syncable::ModelType type, |
59 bool* has_nodes); | 58 bool* has_nodes); |
60 bool CryptoReadyIfNecessary(syncable::ModelType type); | 59 bool CryptoReadyIfNecessary(syncable::ModelType type); |
61 protected: | 60 protected: |
62 // ChangeProcessor interface. | 61 // ChangeProcessor interface. |
63 virtual void StartImpl(Profile* profile) OVERRIDE; // Not implemented. | 62 virtual void StartImpl(Profile* profile) OVERRIDE; // Not implemented. |
64 virtual void StopImpl() OVERRIDE; // Not implemented. | 63 virtual void StopImpl() OVERRIDE; // Not implemented. |
(...skipping 12 matching lines...) Expand all Loading... |
77 // be able to access the sync model before the change processor begins | 76 // be able to access the sync model before the change processor begins |
78 // listening to changes (the local_service_ will be interacting with us | 77 // listening to changes (the local_service_ will be interacting with us |
79 // when it starts up). As such we can't wait until Start(_) has been called, | 78 // when it starts up). As such we can't wait until Start(_) has been called, |
80 // and have to keep a local pointer to the user_share. | 79 // and have to keep a local pointer to the user_share. |
81 sync_api::UserShare* user_share_; | 80 sync_api::UserShare* user_share_; |
82 }; | 81 }; |
83 | 82 |
84 } // namespace browser_sync | 83 } // namespace browser_sync |
85 | 84 |
86 #endif // CHROME_BROWSER_SYNC_GLUE_GENERIC_CHANGE_PROCESSOR_H_ | 85 #endif // CHROME_BROWSER_SYNC_GLUE_GENERIC_CHANGE_PROCESSOR_H_ |
OLD | NEW |