| 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_GENERIC_CHANGE_PROCESSOR_H_ | 5 #ifndef COMPONENTS_SYNC_DRIVER_GENERIC_CHANGE_PROCESSOR_H_ |
| 6 #define COMPONENTS_SYNC_DRIVER_GENERIC_CHANGE_PROCESSOR_H_ | 6 #define COMPONENTS_SYNC_DRIVER_GENERIC_CHANGE_PROCESSOR_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 // Create a change processor for |type| and connect it to the syncer. | 47 // Create a change processor for |type| and connect it to the syncer. |
| 48 // |attachment_store| can be NULL which means that datatype will not use sync | 48 // |attachment_store| can be NULL which means that datatype will not use sync |
| 49 // attachments. | 49 // attachments. |
| 50 GenericChangeProcessor( | 50 GenericChangeProcessor( |
| 51 syncer::ModelType type, | 51 syncer::ModelType type, |
| 52 DataTypeErrorHandler* error_handler, | 52 DataTypeErrorHandler* error_handler, |
| 53 const base::WeakPtr<syncer::SyncableService>& local_service, | 53 const base::WeakPtr<syncer::SyncableService>& local_service, |
| 54 const base::WeakPtr<syncer::SyncMergeResult>& merge_result, | 54 const base::WeakPtr<syncer::SyncMergeResult>& merge_result, |
| 55 syncer::UserShare* user_share, | 55 syncer::UserShare* user_share, |
| 56 SyncApiComponentFactory* sync_factory, | 56 SyncApiComponentFactory* sync_factory, |
| 57 const scoped_refptr<syncer::AttachmentStore>& attachment_store); | 57 scoped_ptr<syncer::AttachmentStore> attachment_store); |
| 58 ~GenericChangeProcessor() override; | 58 ~GenericChangeProcessor() override; |
| 59 | 59 |
| 60 // ChangeProcessor interface. | 60 // ChangeProcessor interface. |
| 61 // Build and store a list of all changes into |syncer_changes_|. | 61 // Build and store a list of all changes into |syncer_changes_|. |
| 62 void ApplyChangesFromSyncModel( | 62 void ApplyChangesFromSyncModel( |
| 63 const syncer::BaseTransaction* trans, | 63 const syncer::BaseTransaction* trans, |
| 64 int64 version, | 64 int64 version, |
| 65 const syncer::ImmutableChangeRecordList& changes) override; | 65 const syncer::ImmutableChangeRecordList& changes) override; |
| 66 // Passes |syncer_changes_|, built in ApplyChangesFromSyncModel, onto | 66 // Passes |syncer_changes_|, built in ApplyChangesFromSyncModel, onto |
| 67 // |local_service_| by way of its ProcessSyncChanges method. | 67 // |local_service_| by way of its ProcessSyncChanges method. |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 attachment_service_weak_ptr_factory_; | 167 attachment_service_weak_ptr_factory_; |
| 168 syncer::AttachmentServiceProxy attachment_service_proxy_; | 168 syncer::AttachmentServiceProxy attachment_service_proxy_; |
| 169 base::WeakPtrFactory<GenericChangeProcessor> weak_ptr_factory_; | 169 base::WeakPtrFactory<GenericChangeProcessor> weak_ptr_factory_; |
| 170 | 170 |
| 171 DISALLOW_COPY_AND_ASSIGN(GenericChangeProcessor); | 171 DISALLOW_COPY_AND_ASSIGN(GenericChangeProcessor); |
| 172 }; | 172 }; |
| 173 | 173 |
| 174 } // namespace sync_driver | 174 } // namespace sync_driver |
| 175 | 175 |
| 176 #endif // COMPONENTS_SYNC_DRIVER_GENERIC_CHANGE_PROCESSOR_H_ | 176 #endif // COMPONENTS_SYNC_DRIVER_GENERIC_CHANGE_PROCESSOR_H_ |
| OLD | NEW |