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