OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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_FAKE_SYNC_CLIENT_H_ | 5 #ifndef COMPONENTS_SYNC_DRIVER_FAKE_SYNC_CLIENT_H_ |
6 #define COMPONENTS_SYNC_DRIVER_FAKE_SYNC_CLIENT_H_ | 6 #define COMPONENTS_SYNC_DRIVER_FAKE_SYNC_CLIENT_H_ |
7 | 7 |
8 #include "components/sync_driver/sync_client.h" | 8 #include "components/sync_driver/sync_client.h" |
9 | 9 |
10 namespace sync_driver { | 10 namespace sync_driver { |
| 11 class FakeSyncService; |
11 | 12 |
12 // Fake implementation of SyncClient interface for tests. | 13 // Fake implementation of SyncClient interface for tests. |
13 class FakeSyncClient : public SyncClient { | 14 class FakeSyncClient : public SyncClient { |
14 public: | 15 public: |
15 FakeSyncClient(); | 16 FakeSyncClient(); |
16 explicit FakeSyncClient(SyncApiComponentFactory* factory); | 17 explicit FakeSyncClient(SyncApiComponentFactory* factory); |
17 ~FakeSyncClient() override; | 18 ~FakeSyncClient() override; |
18 | 19 |
19 SyncService* GetSyncService() override; | 20 SyncService* GetSyncService() override; |
20 PrefService* GetPrefService() override; | 21 PrefService* GetPrefService() override; |
21 bookmarks::BookmarkModel* GetBookmarkModel() override; | 22 bookmarks::BookmarkModel* GetBookmarkModel() override; |
22 history::HistoryService* GetHistoryService() override; | 23 history::HistoryService* GetHistoryService() override; |
23 scoped_refptr<password_manager::PasswordStore> GetPasswordStore() override; | 24 scoped_refptr<password_manager::PasswordStore> GetPasswordStore() override; |
24 autofill::PersonalDataManager* GetPersonalDataManager() override; | 25 autofill::PersonalDataManager* GetPersonalDataManager() override; |
25 scoped_refptr<autofill::AutofillWebDataService> GetWebDataService() override; | 26 scoped_refptr<autofill::AutofillWebDataService> GetWebDataService() override; |
26 base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType( | 27 base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType( |
27 syncer::ModelType type) override; | 28 syncer::ModelType type) override; |
28 SyncApiComponentFactory* GetSyncApiComponentFactory() override; | 29 SyncApiComponentFactory* GetSyncApiComponentFactory() override; |
29 | 30 |
30 private: | 31 private: |
31 SyncApiComponentFactory* factory_; | 32 SyncApiComponentFactory* factory_; |
| 33 scoped_ptr<FakeSyncService> sync_service_; |
32 | 34 |
33 DISALLOW_COPY_AND_ASSIGN(FakeSyncClient); | 35 DISALLOW_COPY_AND_ASSIGN(FakeSyncClient); |
34 }; | 36 }; |
35 | 37 |
36 } // namespace sync_driver | 38 } // namespace sync_driver |
37 | 39 |
38 #endif // COMPONENTS_SYNC_DRIVER_FAKE_SYNC_CLIENT_H_ | 40 #endif // COMPONENTS_SYNC_DRIVER_FAKE_SYNC_CLIENT_H_ |
OLD | NEW |