| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_SYNC_DRIVER_SHARED_CHANGE_PROCESSOR_H_ | 5 #ifndef COMPONENTS_SYNC_DRIVER_SHARED_CHANGE_PROCESSOR_H_ |
| 6 #define COMPONENTS_SYNC_DRIVER_SHARED_CHANGE_PROCESSOR_H_ | 6 #define COMPONENTS_SYNC_DRIVER_SHARED_CHANGE_PROCESSOR_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 typedef base::Callback<void(DataTypeController::ConfigureResult start_result, | 55 typedef base::Callback<void(DataTypeController::ConfigureResult start_result, |
| 56 const SyncMergeResult& local_merge_result, | 56 const SyncMergeResult& local_merge_result, |
| 57 const SyncMergeResult& syncer_merge_result)> | 57 const SyncMergeResult& syncer_merge_result)> |
| 58 StartDoneCallback; | 58 StartDoneCallback; |
| 59 | 59 |
| 60 // Create an uninitialized SharedChangeProcessor. | 60 // Create an uninitialized SharedChangeProcessor. |
| 61 explicit SharedChangeProcessor(ModelType type); | 61 explicit SharedChangeProcessor(ModelType type); |
| 62 | 62 |
| 63 void StartAssociation(StartDoneCallback start_done, | 63 void StartAssociation(StartDoneCallback start_done, |
| 64 SyncClient* const sync_client, | 64 SyncClient* const sync_client, |
| 65 GenericChangeProcessorFactory* processor_factory, |
| 65 UserShare* user_share, | 66 UserShare* user_share, |
| 66 std::unique_ptr<DataTypeErrorHandler> error_handler); | 67 std::unique_ptr<DataTypeErrorHandler> error_handler); |
| 67 | 68 |
| 68 // Connect to the Syncer and prepare to handle changes for |type|. Will | 69 // Connect to the Syncer and prepare to handle changes for |type|. Will |
| 69 // create and store a new GenericChangeProcessor and return a weak pointer to | 70 // create and store a new GenericChangeProcessor and return a weak pointer to |
| 70 // the SyncableService associated with |type|. | 71 // the SyncableService associated with |type|. |
| 71 // Note: If this SharedChangeProcessor has been disconnected, or the | 72 // Note: If this SharedChangeProcessor has been disconnected, or the |
| 72 // SyncableService was not alive, will return a null weak pointer. | 73 // SyncableService was not alive, will return a null weak pointer. |
| 73 virtual base::WeakPtr<SyncableService> Connect( | 74 virtual base::WeakPtr<SyncableService> Connect( |
| 74 SyncClient* sync_client, | 75 SyncClient* sync_client, |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 // The local service for this type. Only set if the DTC for the type uses | 155 // The local service for this type. Only set if the DTC for the type uses |
| 155 // SharedChangeProcessor::StartAssociation(). | 156 // SharedChangeProcessor::StartAssociation(). |
| 156 base::WeakPtr<SyncableService> local_service_; | 157 base::WeakPtr<SyncableService> local_service_; |
| 157 | 158 |
| 158 DISALLOW_COPY_AND_ASSIGN(SharedChangeProcessor); | 159 DISALLOW_COPY_AND_ASSIGN(SharedChangeProcessor); |
| 159 }; | 160 }; |
| 160 | 161 |
| 161 } // namespace syncer | 162 } // namespace syncer |
| 162 | 163 |
| 163 #endif // COMPONENTS_SYNC_DRIVER_SHARED_CHANGE_PROCESSOR_H_ | 164 #endif // COMPONENTS_SYNC_DRIVER_SHARED_CHANGE_PROCESSOR_H_ |
| OLD | NEW |