| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 // Passes |syncer_changes_|, built in ApplyChangesFromSyncModel, onto | 51 // Passes |syncer_changes_|, built in ApplyChangesFromSyncModel, onto |
| 52 // |local_service_| by way of it's ProcessSyncChanges method. | 52 // |local_service_| by way of it's ProcessSyncChanges method. |
| 53 virtual void CommitChangesFromSyncModel() OVERRIDE; | 53 virtual void CommitChangesFromSyncModel() OVERRIDE; |
| 54 | 54 |
| 55 // SyncChangeProcessor implementation. | 55 // SyncChangeProcessor implementation. |
| 56 virtual SyncError ProcessSyncChanges( | 56 virtual SyncError ProcessSyncChanges( |
| 57 const tracked_objects::Location& from_here, | 57 const tracked_objects::Location& from_here, |
| 58 const SyncChangeList& change_list) OVERRIDE; | 58 const SyncChangeList& change_list) OVERRIDE; |
| 59 | 59 |
| 60 // Fills |current_sync_data| with all the syncer data for the specified type. | 60 // Fills |current_sync_data| with all the syncer data for the specified type. |
| 61 SyncError GetSyncDataForType(syncable::ModelType type, | 61 virtual SyncError GetSyncDataForType(syncable::ModelType type, |
| 62 SyncDataList* current_sync_data); | 62 SyncDataList* current_sync_data); |
| 63 | 63 |
| 64 // Generic versions of AssociatorInterface methods. Called by | 64 // Generic versions of AssociatorInterface methods. Called by |
| 65 // SyncableServiceAdapter or the DataTypeController. | 65 // SyncableServiceAdapter or the DataTypeController. |
| 66 bool SyncModelHasUserCreatedNodes(syncable::ModelType type, | 66 virtual bool SyncModelHasUserCreatedNodes(syncable::ModelType type, |
| 67 bool* has_nodes); | 67 bool* has_nodes); |
| 68 bool CryptoReadyIfNecessary(syncable::ModelType type); | 68 virtual bool CryptoReadyIfNecessary(syncable::ModelType type); |
| 69 | 69 |
| 70 protected: | 70 protected: |
| 71 // ChangeProcessor interface. | 71 // ChangeProcessor interface. |
| 72 virtual void StartImpl(Profile* profile) OVERRIDE; // Does nothing. | 72 virtual void StartImpl(Profile* profile) OVERRIDE; // Does nothing. |
| 73 // Called from UI thread (as part of deactivating datatype), but does | 73 // Called from UI thread (as part of deactivating datatype), but does |
| 74 // nothing and is guaranteed to still be alive, so it's okay. | 74 // nothing and is guaranteed to still be alive, so it's okay. |
| 75 virtual void StopImpl() OVERRIDE; // Does nothing. | 75 virtual void StopImpl() OVERRIDE; // Does nothing. |
| 76 virtual sync_api::UserShare* share_handle() const OVERRIDE; | 76 virtual sync_api::UserShare* share_handle() const OVERRIDE; |
| 77 | 77 |
| 78 private: | 78 private: |
| (...skipping 12 matching lines...) Expand all Loading... |
| 91 // when it starts up). As such we can't wait until Start(_) has been called, | 91 // when it starts up). As such we can't wait until Start(_) has been called, |
| 92 // and have to keep a local pointer to the user_share. | 92 // and have to keep a local pointer to the user_share. |
| 93 sync_api::UserShare* const share_handle_; | 93 sync_api::UserShare* const share_handle_; |
| 94 | 94 |
| 95 DISALLOW_COPY_AND_ASSIGN(GenericChangeProcessor); | 95 DISALLOW_COPY_AND_ASSIGN(GenericChangeProcessor); |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 } // namespace browser_sync | 98 } // namespace browser_sync |
| 99 | 99 |
| 100 #endif // CHROME_BROWSER_SYNC_GLUE_GENERIC_CHANGE_PROCESSOR_H_ | 100 #endif // CHROME_BROWSER_SYNC_GLUE_GENERIC_CHANGE_PROCESSOR_H_ |
| OLD | NEW |