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

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

Issue 2289143003: [Sync] Convert DTCs to be not RefCounted and NonThreadSafe. (Closed)
Patch Set: Rebase. Created 4 years, 3 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 (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 10
11 #include "components/sync/api/data_type_error_handler.h"
10 #include "components/sync/base/model_type.h" 12 #include "components/sync/base/model_type.h"
11 #include "components/sync/core/data_type_error_handler.h"
12 #include "components/sync/driver/data_type_controller.h" 13 #include "components/sync/driver/data_type_controller.h"
13 #include "components/sync/driver/sync_api_component_factory.h" 14 #include "components/sync/driver/sync_api_component_factory.h"
14 #include "testing/gmock/include/gmock/gmock.h" 15 #include "testing/gmock/include/gmock/gmock.h"
15 16
16 namespace sync_driver { 17 namespace sync_driver {
17 class AssociatorInterface; 18 class AssociatorInterface;
18 class ChangeProcessor; 19 class ChangeProcessor;
19 class DataTypeEncryptionHandler; 20 class DataTypeEncryptionHandler;
20 class DataTypeStatusTable; 21 class DataTypeStatusTable;
21 class SyncClient; 22 class SyncClient;
(...skipping 29 matching lines...) Expand all
51 CreateLocalDeviceInfoProvider() override; 52 CreateLocalDeviceInfoProvider() override;
52 void SetLocalDeviceInfoProvider( 53 void SetLocalDeviceInfoProvider(
53 std::unique_ptr<sync_driver::LocalDeviceInfoProvider> local_device); 54 std::unique_ptr<sync_driver::LocalDeviceInfoProvider> local_device);
54 55
55 std::unique_ptr<syncer::AttachmentService> CreateAttachmentService( 56 std::unique_ptr<syncer::AttachmentService> CreateAttachmentService(
56 std::unique_ptr<syncer::AttachmentStoreForSync> attachment_store, 57 std::unique_ptr<syncer::AttachmentStoreForSync> attachment_store,
57 const syncer::UserShare& user_share, 58 const syncer::UserShare& user_share,
58 const std::string& store_birthday, 59 const std::string& store_birthday,
59 syncer::ModelType model_type, 60 syncer::ModelType model_type,
60 syncer::AttachmentService::Delegate* delegate) override; 61 syncer::AttachmentService::Delegate* delegate) override;
61 MOCK_METHOD2(CreateBookmarkSyncComponents, 62 SyncComponents CreateBookmarkSyncComponents(
62 SyncComponents(sync_driver::SyncService* sync_service, 63 sync_driver::SyncService* sync_service,
63 syncer::DataTypeErrorHandler* error_handler)); 64 std::unique_ptr<syncer::DataTypeErrorHandler> error_handler) override;
64 MOCK_METHOD3(CreateTypedUrlSyncComponents,
65 SyncComponents(sync_driver::SyncService* sync_service,
66 history::HistoryBackend* history_backend,
67 syncer::DataTypeErrorHandler* error_handler));
68 65
69 private: 66 private:
70 sync_driver::SyncApiComponentFactory::SyncComponents MakeSyncComponents(); 67 sync_driver::SyncApiComponentFactory::SyncComponents MakeSyncComponents();
71 68
72 std::unique_ptr<sync_driver::AssociatorInterface> model_associator_; 69 std::unique_ptr<sync_driver::AssociatorInterface> model_associator_;
73 std::unique_ptr<sync_driver::ChangeProcessor> change_processor_; 70 std::unique_ptr<sync_driver::ChangeProcessor> change_processor_;
74 // LocalDeviceInfoProvider is initially owned by this class, 71 // LocalDeviceInfoProvider is initially owned by this class,
75 // transferred to caller when CreateLocalDeviceInfoProvider is called. 72 // transferred to caller when CreateLocalDeviceInfoProvider is called.
76 std::unique_ptr<sync_driver::LocalDeviceInfoProvider> local_device_; 73 std::unique_ptr<sync_driver::LocalDeviceInfoProvider> local_device_;
77 }; 74 };
78 75
79 #endif // COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_MOCK_H__ 76 #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_api_component_factory_mock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698