OLD | NEW |
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 | 9 |
10 #include "components/sync_driver/data_type_controller.h" | 10 #include "components/sync_driver/data_type_controller.h" |
11 #include "components/sync_driver/data_type_error_handler.h" | |
12 #include "components/sync_driver/sync_api_component_factory.h" | 11 #include "components/sync_driver/sync_api_component_factory.h" |
13 #include "sync/internal_api/public/base/model_type.h" | 12 #include "sync/internal_api/public/base/model_type.h" |
| 13 #include "sync/internal_api/public/data_type_error_handler.h" |
14 #include "testing/gmock/include/gmock/gmock.h" | 14 #include "testing/gmock/include/gmock/gmock.h" |
15 | 15 |
16 namespace sync_driver { | 16 namespace sync_driver { |
17 class AssociatorInterface; | 17 class AssociatorInterface; |
18 class ChangeProcessor; | 18 class ChangeProcessor; |
19 class DataTypeEncryptionHandler; | 19 class DataTypeEncryptionHandler; |
20 class DataTypeStatusTable; | 20 class DataTypeStatusTable; |
21 class SyncClient; | 21 class SyncClient; |
22 } | 22 } |
23 | 23 |
(...skipping 28 matching lines...) Expand all Loading... |
52 void SetLocalDeviceInfoProvider( | 52 void SetLocalDeviceInfoProvider( |
53 std::unique_ptr<sync_driver::LocalDeviceInfoProvider> local_device); | 53 std::unique_ptr<sync_driver::LocalDeviceInfoProvider> local_device); |
54 | 54 |
55 std::unique_ptr<syncer::AttachmentService> CreateAttachmentService( | 55 std::unique_ptr<syncer::AttachmentService> CreateAttachmentService( |
56 std::unique_ptr<syncer::AttachmentStoreForSync> attachment_store, | 56 std::unique_ptr<syncer::AttachmentStoreForSync> attachment_store, |
57 const syncer::UserShare& user_share, | 57 const syncer::UserShare& user_share, |
58 const std::string& store_birthday, | 58 const std::string& store_birthday, |
59 syncer::ModelType model_type, | 59 syncer::ModelType model_type, |
60 syncer::AttachmentService::Delegate* delegate) override; | 60 syncer::AttachmentService::Delegate* delegate) override; |
61 MOCK_METHOD2(CreateBookmarkSyncComponents, | 61 MOCK_METHOD2(CreateBookmarkSyncComponents, |
62 SyncComponents(sync_driver::SyncService* sync_service, | 62 SyncComponents(sync_driver::SyncService* sync_service, |
63 sync_driver::DataTypeErrorHandler* error_handler)); | 63 syncer::DataTypeErrorHandler* error_handler)); |
64 MOCK_METHOD3(CreateTypedUrlSyncComponents, | 64 MOCK_METHOD3(CreateTypedUrlSyncComponents, |
65 SyncComponents( | 65 SyncComponents(sync_driver::SyncService* sync_service, |
66 sync_driver::SyncService* sync_service, | 66 history::HistoryBackend* history_backend, |
67 history::HistoryBackend* history_backend, | 67 syncer::DataTypeErrorHandler* error_handler)); |
68 sync_driver::DataTypeErrorHandler* error_handler)); | |
69 | 68 |
70 private: | 69 private: |
71 sync_driver::SyncApiComponentFactory::SyncComponents MakeSyncComponents(); | 70 sync_driver::SyncApiComponentFactory::SyncComponents MakeSyncComponents(); |
72 | 71 |
73 std::unique_ptr<sync_driver::AssociatorInterface> model_associator_; | 72 std::unique_ptr<sync_driver::AssociatorInterface> model_associator_; |
74 std::unique_ptr<sync_driver::ChangeProcessor> change_processor_; | 73 std::unique_ptr<sync_driver::ChangeProcessor> change_processor_; |
75 // LocalDeviceInfoProvider is initially owned by this class, | 74 // LocalDeviceInfoProvider is initially owned by this class, |
76 // transferred to caller when CreateLocalDeviceInfoProvider is called. | 75 // transferred to caller when CreateLocalDeviceInfoProvider is called. |
77 std::unique_ptr<sync_driver::LocalDeviceInfoProvider> local_device_; | 76 std::unique_ptr<sync_driver::LocalDeviceInfoProvider> local_device_; |
78 }; | 77 }; |
79 | 78 |
80 #endif // COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_MOCK_H__ | 79 #endif // COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_MOCK_H__ |
OLD | NEW |