[Sync] Componentize UIModelWorker.
[chromium-blink-merge.git] / components / sync_driver / fake_sync_client.h
blobeadeef2eeb69805b3a9a02d922a80983570f148e
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_SYNC_DRIVER_FAKE_SYNC_CLIENT_H_
6 #define COMPONENTS_SYNC_DRIVER_FAKE_SYNC_CLIENT_H_
8 #include "components/sync_driver/sync_client.h"
10 namespace sync_driver {
11 class FakeSyncService;
13 // Fake implementation of SyncClient interface for tests.
14 class FakeSyncClient : public SyncClient {
15 public:
16 FakeSyncClient();
17 explicit FakeSyncClient(SyncApiComponentFactory* factory);
18 ~FakeSyncClient() override;
20 SyncService* GetSyncService() override;
21 PrefService* GetPrefService() override;
22 bookmarks::BookmarkModel* GetBookmarkModel() override;
23 history::HistoryService* GetHistoryService() override;
24 scoped_refptr<password_manager::PasswordStore> GetPasswordStore() override;
25 autofill::PersonalDataManager* GetPersonalDataManager() override;
26 scoped_refptr<autofill::AutofillWebDataService> GetWebDataService() override;
27 base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType(
28 syncer::ModelType type) override;
29 SyncApiComponentFactory* GetSyncApiComponentFactory() override;
31 private:
32 SyncApiComponentFactory* factory_;
33 scoped_ptr<FakeSyncService> sync_service_;
35 DISALLOW_COPY_AND_ASSIGN(FakeSyncClient);
38 } // namespace sync_driver
40 #endif // COMPONENTS_SYNC_DRIVER_FAKE_SYNC_CLIENT_H_