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 <memory> | 8 #include <memory> |
9 | 9 |
| 10 #include "base/files/file_path.h" |
10 #include "base/macros.h" | 11 #include "base/macros.h" |
11 #include "components/sync/driver/sync_client.h" | 12 #include "components/sync/driver/sync_client.h" |
12 #include "components/sync_preferences/testing_pref_service_syncable.h" | 13 #include "components/sync_preferences/testing_pref_service_syncable.h" |
13 | 14 |
14 namespace syncer { | 15 namespace syncer { |
15 | 16 |
16 class FakeSyncService; | 17 class FakeSyncService; |
17 | 18 |
18 // Fake implementation of SyncClient interface for tests. | 19 // Fake implementation of SyncClient interface for tests. |
19 class FakeSyncClient : public SyncClient { | 20 class FakeSyncClient : public SyncClient { |
20 public: | 21 public: |
21 FakeSyncClient(); | 22 FakeSyncClient(); |
22 explicit FakeSyncClient(SyncApiComponentFactory* factory); | 23 explicit FakeSyncClient(SyncApiComponentFactory* factory); |
23 ~FakeSyncClient() override; | 24 ~FakeSyncClient() override; |
24 | 25 |
25 void Initialize() override; | 26 void Initialize() override; |
26 | 27 |
27 SyncService* GetSyncService() override; | 28 SyncService* GetSyncService() override; |
28 PrefService* GetPrefService() override; | 29 PrefService* GetPrefService() override; |
| 30 base::FilePath GetLocalSyncBackendFolder() override; |
29 bookmarks::BookmarkModel* GetBookmarkModel() override; | 31 bookmarks::BookmarkModel* GetBookmarkModel() override; |
30 favicon::FaviconService* GetFaviconService() override; | 32 favicon::FaviconService* GetFaviconService() override; |
31 history::HistoryService* GetHistoryService() override; | 33 history::HistoryService* GetHistoryService() override; |
32 bool HasPasswordStore() override; | 34 bool HasPasswordStore() override; |
33 base::Closure GetPasswordStateChangedCallback() override; | 35 base::Closure GetPasswordStateChangedCallback() override; |
34 SyncApiComponentFactory::RegisterDataTypesMethod | 36 SyncApiComponentFactory::RegisterDataTypesMethod |
35 GetRegisterPlatformTypesCallback() override; | 37 GetRegisterPlatformTypesCallback() override; |
36 autofill::PersonalDataManager* GetPersonalDataManager() override; | 38 autofill::PersonalDataManager* GetPersonalDataManager() override; |
37 BookmarkUndoService* GetBookmarkUndoServiceIfExists() override; | 39 BookmarkUndoService* GetBookmarkUndoServiceIfExists() override; |
38 invalidation::InvalidationService* GetInvalidationService() override; | 40 invalidation::InvalidationService* GetInvalidationService() override; |
(...skipping 14 matching lines...) Expand all Loading... |
53 ModelTypeSyncBridge* bridge_; | 55 ModelTypeSyncBridge* bridge_; |
54 SyncApiComponentFactory* factory_; | 56 SyncApiComponentFactory* factory_; |
55 std::unique_ptr<FakeSyncService> sync_service_; | 57 std::unique_ptr<FakeSyncService> sync_service_; |
56 | 58 |
57 DISALLOW_COPY_AND_ASSIGN(FakeSyncClient); | 59 DISALLOW_COPY_AND_ASSIGN(FakeSyncClient); |
58 }; | 60 }; |
59 | 61 |
60 } // namespace syncer | 62 } // namespace syncer |
61 | 63 |
62 #endif // COMPONENTS_SYNC_DRIVER_FAKE_SYNC_CLIENT_H_ | 64 #endif // COMPONENTS_SYNC_DRIVER_FAKE_SYNC_CLIENT_H_ |
OLD | NEW |