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