| 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 <stdint.h> |
| 9 |
| 8 #include <string> | 10 #include <string> |
| 9 #include <vector> | 11 #include <vector> |
| 10 | 12 |
| 11 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/macros.h" |
| 12 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 13 #include "base/threading/non_thread_safe.h" | 16 #include "base/threading/non_thread_safe.h" |
| 14 #include "components/sync_driver/change_processor.h" | 17 #include "components/sync_driver/change_processor.h" |
| 15 #include "components/sync_driver/data_type_error_handler.h" | 18 #include "components/sync_driver/data_type_error_handler.h" |
| 16 #include "sync/api/attachments/attachment_store.h" | 19 #include "sync/api/attachments/attachment_store.h" |
| 17 #include "sync/api/sync_change_processor.h" | 20 #include "sync/api/sync_change_processor.h" |
| 18 #include "sync/api/sync_merge_result.h" | 21 #include "sync/api/sync_merge_result.h" |
| 19 #include "sync/internal_api/public/attachments/attachment_service.h" | 22 #include "sync/internal_api/public/attachments/attachment_service.h" |
| 20 #include "sync/internal_api/public/attachments/attachment_service_proxy.h" | 23 #include "sync/internal_api/public/attachments/attachment_service_proxy.h" |
| 21 | 24 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 const base::WeakPtr<syncer::SyncMergeResult>& merge_result, | 59 const base::WeakPtr<syncer::SyncMergeResult>& merge_result, |
| 57 syncer::UserShare* user_share, | 60 syncer::UserShare* user_share, |
| 58 SyncClient* sync_client, | 61 SyncClient* sync_client, |
| 59 scoped_ptr<syncer::AttachmentStoreForSync> attachment_store); | 62 scoped_ptr<syncer::AttachmentStoreForSync> attachment_store); |
| 60 ~GenericChangeProcessor() override; | 63 ~GenericChangeProcessor() override; |
| 61 | 64 |
| 62 // ChangeProcessor interface. | 65 // ChangeProcessor interface. |
| 63 // Build and store a list of all changes into |syncer_changes_|. | 66 // Build and store a list of all changes into |syncer_changes_|. |
| 64 void ApplyChangesFromSyncModel( | 67 void ApplyChangesFromSyncModel( |
| 65 const syncer::BaseTransaction* trans, | 68 const syncer::BaseTransaction* trans, |
| 66 int64 version, | 69 int64_t version, |
| 67 const syncer::ImmutableChangeRecordList& changes) override; | 70 const syncer::ImmutableChangeRecordList& changes) override; |
| 68 // Passes |syncer_changes_|, built in ApplyChangesFromSyncModel, onto | 71 // Passes |syncer_changes_|, built in ApplyChangesFromSyncModel, onto |
| 69 // |local_service_| by way of its ProcessSyncChanges method. | 72 // |local_service_| by way of its ProcessSyncChanges method. |
| 70 void CommitChangesFromSyncModel() override; | 73 void CommitChangesFromSyncModel() override; |
| 71 | 74 |
| 72 // syncer::SyncChangeProcessor implementation. | 75 // syncer::SyncChangeProcessor implementation. |
| 73 syncer::SyncError ProcessSyncChanges( | 76 syncer::SyncError ProcessSyncChanges( |
| 74 const tracked_objects::Location& from_here, | 77 const tracked_objects::Location& from_here, |
| 75 const syncer::SyncChangeList& change_list) override; | 78 const syncer::SyncChangeList& change_list) override; |
| 76 syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const override; | 79 syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const override; |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 attachment_service_weak_ptr_factory_; | 172 attachment_service_weak_ptr_factory_; |
| 170 syncer::AttachmentServiceProxy attachment_service_proxy_; | 173 syncer::AttachmentServiceProxy attachment_service_proxy_; |
| 171 base::WeakPtrFactory<GenericChangeProcessor> weak_ptr_factory_; | 174 base::WeakPtrFactory<GenericChangeProcessor> weak_ptr_factory_; |
| 172 | 175 |
| 173 DISALLOW_COPY_AND_ASSIGN(GenericChangeProcessor); | 176 DISALLOW_COPY_AND_ASSIGN(GenericChangeProcessor); |
| 174 }; | 177 }; |
| 175 | 178 |
| 176 } // namespace sync_driver | 179 } // namespace sync_driver |
| 177 | 180 |
| 178 #endif // COMPONENTS_SYNC_DRIVER_GENERIC_CHANGE_PROCESSOR_H_ | 181 #endif // COMPONENTS_SYNC_DRIVER_GENERIC_CHANGE_PROCESSOR_H_ |
| OLD | NEW |