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
{
12 // Fake implementation of SyncClient interface for tests.
13 class FakeSyncClient
: public SyncClient
{
16 explicit FakeSyncClient(SyncApiComponentFactory
* factory
);
17 ~FakeSyncClient() override
;
19 SyncService
* GetSyncService() override
;
20 PrefService
* GetPrefService() override
;
21 bookmarks::BookmarkModel
* GetBookmarkModel() override
;
22 history::HistoryService
* GetHistoryService() override
;
23 scoped_refptr
<password_manager::PasswordStore
> GetPasswordStore() override
;
24 autofill::PersonalDataManager
* GetPersonalDataManager() override
;
25 scoped_refptr
<autofill::AutofillWebDataService
> GetWebDataService() override
;
26 base::WeakPtr
<syncer::SyncableService
> GetSyncableServiceForType(
27 syncer::ModelType type
) override
;
28 SyncApiComponentFactory
* GetSyncApiComponentFactory() override
;
31 SyncApiComponentFactory
* factory_
;
33 DISALLOW_COPY_AND_ASSIGN(FakeSyncClient
);
36 } // namespace sync_driver
38 #endif // COMPONENTS_SYNC_DRIVER_FAKE_SYNC_CLIENT_H_