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

Side by Side Diff: components/sync/driver/sync_api_component_factory_mock.h

Issue 2533083002: [Sync] SyncEngine refactor part 1: interfaces. (Closed)
Patch Set: Rebase. Created 4 years 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 (c) 2012 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 COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_MOCK_H__ 5 #ifndef COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_MOCK_H__
6 #define COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_MOCK_H__ 6 #define COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_MOCK_H__
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 15 matching lines...) Expand all
26 SyncApiComponentFactoryMock(AssociatorInterface* model_associator, 26 SyncApiComponentFactoryMock(AssociatorInterface* model_associator,
27 ChangeProcessor* change_processor); 27 ChangeProcessor* change_processor);
28 ~SyncApiComponentFactoryMock() override; 28 ~SyncApiComponentFactoryMock() override;
29 29
30 MOCK_METHOD2(RegisterDataTypes, 30 MOCK_METHOD2(RegisterDataTypes,
31 void(SyncService* sync_service, const RegisterDataTypesMethod&)); 31 void(SyncService* sync_service, const RegisterDataTypesMethod&));
32 MOCK_METHOD5(CreateDataTypeManager, 32 MOCK_METHOD5(CreateDataTypeManager,
33 DataTypeManager*(const WeakHandle<DataTypeDebugInfoListener>&, 33 DataTypeManager*(const WeakHandle<DataTypeDebugInfoListener>&,
34 const DataTypeController::TypeMap*, 34 const DataTypeController::TypeMap*,
35 const DataTypeEncryptionHandler*, 35 const DataTypeEncryptionHandler*,
36 SyncBackendHost*, 36 SyncEngine*,
37 DataTypeManagerObserver* observer)); 37 DataTypeManagerObserver* observer));
38 MOCK_METHOD4(CreateSyncBackendHost, 38 MOCK_METHOD4(CreateSyncEngine,
39 SyncBackendHost*(const std::string& name, 39 SyncEngine*(const std::string& name,
40 invalidation::InvalidationService* invalidator, 40 invalidation::InvalidationService* invalidator,
41 const base::WeakPtr<SyncPrefs>& sync_prefs, 41 const base::WeakPtr<SyncPrefs>& sync_prefs,
42 const base::FilePath& sync_folder)); 42 const base::FilePath& sync_folder));
43 43
44 std::unique_ptr<LocalDeviceInfoProvider> CreateLocalDeviceInfoProvider() 44 std::unique_ptr<LocalDeviceInfoProvider> CreateLocalDeviceInfoProvider()
45 override; 45 override;
46 void SetLocalDeviceInfoProvider( 46 void SetLocalDeviceInfoProvider(
47 std::unique_ptr<LocalDeviceInfoProvider> local_device); 47 std::unique_ptr<LocalDeviceInfoProvider> local_device);
48 48
49 std::unique_ptr<AttachmentService> CreateAttachmentService( 49 std::unique_ptr<AttachmentService> CreateAttachmentService(
50 std::unique_ptr<AttachmentStoreForSync> attachment_store, 50 std::unique_ptr<AttachmentStoreForSync> attachment_store,
51 const UserShare& user_share, 51 const UserShare& user_share,
52 const std::string& store_birthday, 52 const std::string& store_birthday,
53 ModelType model_type, 53 ModelType model_type,
54 AttachmentService::Delegate* delegate) override; 54 AttachmentService::Delegate* delegate) override;
55 SyncComponents CreateBookmarkSyncComponents( 55 SyncComponents CreateBookmarkSyncComponents(
56 SyncService* sync_service, 56 SyncService* sync_service,
57 std::unique_ptr<DataTypeErrorHandler> error_handler) override; 57 std::unique_ptr<DataTypeErrorHandler> error_handler) override;
58 58
59 private: 59 private:
60 SyncApiComponentFactory::SyncComponents MakeSyncComponents(); 60 SyncApiComponentFactory::SyncComponents MakeSyncComponents();
61 61
62 std::unique_ptr<AssociatorInterface> model_associator_; 62 std::unique_ptr<AssociatorInterface> model_associator_;
63 std::unique_ptr<ChangeProcessor> change_processor_; 63 std::unique_ptr<ChangeProcessor> change_processor_;
64 // LocalDeviceInfoProvider is initially owned by this class, 64 // LocalDeviceInfoProvider is initially owned by this class,
65 // transferred to caller when CreateLocalDeviceInfoProvider is called. 65 // transferred to caller when CreateLocalDeviceInfoProvider is called.
66 std::unique_ptr<LocalDeviceInfoProvider> local_device_; 66 std::unique_ptr<LocalDeviceInfoProvider> local_device_;
67 }; 67 };
68 68
69 } // namespace syncer 69 } // namespace syncer
70 70
71 #endif // COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_MOCK_H__ 71 #endif // COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_MOCK_H__
OLDNEW
« no previous file with comments | « components/sync/driver/sync_api_component_factory.h ('k') | components/sync/driver/sync_frontend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698