Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(585)

Side by Side Diff: components/sync_driver/generic_change_processor.h

Issue 1966023002: [Sync] Move DataTypeErrorHandler to //sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
17 #include "base/threading/non_thread_safe.h" 17 #include "base/threading/non_thread_safe.h"
18 #include "components/sync_driver/change_processor.h" 18 #include "components/sync_driver/change_processor.h"
19 #include "components/sync_driver/data_type_error_handler.h"
20 #include "sync/api/attachments/attachment_store.h" 19 #include "sync/api/attachments/attachment_store.h"
21 #include "sync/api/sync_change_processor.h" 20 #include "sync/api/sync_change_processor.h"
22 #include "sync/api/sync_merge_result.h" 21 #include "sync/api/sync_merge_result.h"
23 #include "sync/internal_api/public/attachments/attachment_service.h" 22 #include "sync/internal_api/public/attachments/attachment_service.h"
24 #include "sync/internal_api/public/attachments/attachment_service_proxy.h" 23 #include "sync/internal_api/public/attachments/attachment_service_proxy.h"
24 #include "sync/internal_api/public/data_type_error_handler.h"
pavely 2016/05/11 18:29:04 Could you remove either include or forward-declare
maxbogue 2016/05/11 19:03:02 Done.
25 25
26 namespace syncer { 26 namespace syncer {
27 class DataTypeErrorHandler;
27 class SyncData; 28 class SyncData;
28 class SyncableService; 29 class SyncableService;
29 class WriteNode; 30 class WriteNode;
30 class WriteTransaction; 31 class WriteTransaction;
31 32
32 typedef std::vector<syncer::SyncData> SyncDataList; 33 typedef std::vector<syncer::SyncData> SyncDataList;
33 } // namespace syncer 34 } // namespace syncer
34 35
35 namespace sync_driver { 36 namespace sync_driver {
36 37
(...skipping 11 matching lines...) Expand all
48 class GenericChangeProcessor : public ChangeProcessor, 49 class GenericChangeProcessor : public ChangeProcessor,
49 public syncer::SyncChangeProcessor, 50 public syncer::SyncChangeProcessor,
50 public syncer::AttachmentService::Delegate, 51 public syncer::AttachmentService::Delegate,
51 public base::NonThreadSafe { 52 public base::NonThreadSafe {
52 public: 53 public:
53 // Create a change processor for |type| and connect it to the syncer. 54 // Create a change processor for |type| and connect it to the syncer.
54 // |attachment_store| can be NULL which means that datatype will not use sync 55 // |attachment_store| can be NULL which means that datatype will not use sync
55 // attachments. 56 // attachments.
56 GenericChangeProcessor( 57 GenericChangeProcessor(
57 syncer::ModelType type, 58 syncer::ModelType type,
58 DataTypeErrorHandler* error_handler, 59 syncer::DataTypeErrorHandler* error_handler,
59 const base::WeakPtr<syncer::SyncableService>& local_service, 60 const base::WeakPtr<syncer::SyncableService>& local_service,
60 const base::WeakPtr<syncer::SyncMergeResult>& merge_result, 61 const base::WeakPtr<syncer::SyncMergeResult>& merge_result,
61 syncer::UserShare* user_share, 62 syncer::UserShare* user_share,
62 SyncClient* sync_client, 63 SyncClient* sync_client,
63 std::unique_ptr<syncer::AttachmentStoreForSync> attachment_store); 64 std::unique_ptr<syncer::AttachmentStoreForSync> attachment_store);
64 ~GenericChangeProcessor() override; 65 ~GenericChangeProcessor() override;
65 66
66 // ChangeProcessor interface. 67 // ChangeProcessor interface.
67 // Build and store a list of all changes into |syncer_changes_|. 68 // Build and store a list of all changes into |syncer_changes_|.
68 void ApplyChangesFromSyncModel( 69 void ApplyChangesFromSyncModel(
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 attachment_service_weak_ptr_factory_; 174 attachment_service_weak_ptr_factory_;
174 syncer::AttachmentServiceProxy attachment_service_proxy_; 175 syncer::AttachmentServiceProxy attachment_service_proxy_;
175 base::WeakPtrFactory<GenericChangeProcessor> weak_ptr_factory_; 176 base::WeakPtrFactory<GenericChangeProcessor> weak_ptr_factory_;
176 177
177 DISALLOW_COPY_AND_ASSIGN(GenericChangeProcessor); 178 DISALLOW_COPY_AND_ASSIGN(GenericChangeProcessor);
178 }; 179 };
179 180
180 } // namespace sync_driver 181 } // namespace sync_driver
181 182
182 #endif // COMPONENTS_SYNC_DRIVER_GENERIC_CHANGE_PROCESSOR_H_ 183 #endif // COMPONENTS_SYNC_DRIVER_GENERIC_CHANGE_PROCESSOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698