| 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 void ProcessSyncChanges(const tracked_objects::Location& from_here, | 48 virtual SyncError ProcessSyncChanges( |
| 49 const SyncChangeList& change_list) OVERRIDE; | 49 const tracked_objects::Location& from_here, |
| 50 const SyncChangeList& change_list) OVERRIDE; |
| 50 | 51 |
| 51 // Fills |current_sync_data| with all the syncer data for the specified type. | 52 // Fills |current_sync_data| with all the syncer data for the specified type. |
| 52 virtual bool GetSyncDataForType(syncable::ModelType type, | 53 virtual SyncError GetSyncDataForType(syncable::ModelType type, |
| 53 SyncDataList* current_sync_data); | 54 SyncDataList* current_sync_data); |
| 54 | 55 |
| 55 // Generic versions of AssociatorInterface methods. Called by | 56 // Generic versions of AssociatorInterface methods. Called by |
| 56 // SyncableServiceAdapter. | 57 // SyncableServiceAdapter. |
| 57 bool SyncModelHasUserCreatedNodes(syncable::ModelType type, | 58 bool SyncModelHasUserCreatedNodes(syncable::ModelType type, |
| 58 bool* has_nodes); | 59 bool* has_nodes); |
| 59 bool CryptoReadyIfNecessary(syncable::ModelType type); | 60 bool CryptoReadyIfNecessary(syncable::ModelType type); |
| 60 protected: | 61 protected: |
| 61 // ChangeProcessor interface. | 62 // ChangeProcessor interface. |
| 62 virtual void StartImpl(Profile* profile) OVERRIDE; // Not implemented. | 63 virtual void StartImpl(Profile* profile) OVERRIDE; // Not implemented. |
| 63 virtual void StopImpl() OVERRIDE; // Not implemented. | 64 virtual void StopImpl() OVERRIDE; // Not implemented. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 76 // be able to access the sync model before the change processor begins | 77 // be able to access the sync model before the change processor begins |
| 77 // listening to changes (the local_service_ will be interacting with us | 78 // listening to changes (the local_service_ will be interacting with us |
| 78 // when it starts up). As such we can't wait until Start(_) has been called, | 79 // when it starts up). As such we can't wait until Start(_) has been called, |
| 79 // and have to keep a local pointer to the user_share. | 80 // and have to keep a local pointer to the user_share. |
| 80 sync_api::UserShare* user_share_; | 81 sync_api::UserShare* user_share_; |
| 81 }; | 82 }; |
| 82 | 83 |
| 83 } // namespace browser_sync | 84 } // namespace browser_sync |
| 84 | 85 |
| 85 #endif // CHROME_BROWSER_SYNC_GLUE_GENERIC_CHANGE_PROCESSOR_H_ | 86 #endif // CHROME_BROWSER_SYNC_GLUE_GENERIC_CHANGE_PROCESSOR_H_ |
| OLD | NEW |