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_SYNC_CLIENT_H_ | 5 #ifndef COMPONENTS_SYNC_DRIVER_SYNC_CLIENT_H_ |
6 #define COMPONENTS_SYNC_DRIVER_SYNC_CLIENT_H_ | 6 #define COMPONENTS_SYNC_DRIVER_SYNC_CLIENT_H_ |
7 | 7 |
8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "components/sync/base/extensions_activity.h" | 12 #include "components/sync/base/extensions_activity.h" |
13 #include "components/sync/base/model_type.h" | 13 #include "components/sync/base/model_type.h" |
14 #include "components/sync/driver/sync_api_component_factory.h" | 14 #include "components/sync/driver/sync_api_component_factory.h" |
15 #include "components/sync/engine/model_safe_worker.h" | 15 #include "components/sync/engine/model_safe_worker.h" |
16 #include "components/sync/model/model_type_sync_bridge.h" | 16 #include "components/sync/model/model_type_sync_bridge.h" |
17 | 17 |
18 class BookmarkUndoService; | 18 class BookmarkUndoService; |
19 class PrefService; | 19 class PrefService; |
20 | 20 |
21 namespace autofill { | 21 namespace autofill { |
22 class PersonalDataManager; | 22 class PersonalDataManager; |
23 } // namespace autofill | 23 } // namespace autofill |
24 | 24 |
| 25 namespace base { |
| 26 class SequencedWorkerPool; |
| 27 } // namespace base |
| 28 |
25 namespace bookmarks { | 29 namespace bookmarks { |
26 class BookmarkModel; | 30 class BookmarkModel; |
27 } // namespace bookmarks | 31 } // namespace bookmarks |
28 | 32 |
29 namespace favicon { | 33 namespace favicon { |
30 class FaviconService; | 34 class FaviconService; |
31 } // namespace favicon | 35 } // namespace favicon |
32 | 36 |
33 namespace history { | 37 namespace history { |
34 class HistoryService; | 38 class HistoryService; |
(...skipping 19 matching lines...) Expand all Loading... |
54 // Note: on some platforms, getters might return nullptr. Callers are expected | 58 // Note: on some platforms, getters might return nullptr. Callers are expected |
55 // to handle these scenarios gracefully. | 59 // to handle these scenarios gracefully. |
56 class SyncClient { | 60 class SyncClient { |
57 public: | 61 public: |
58 SyncClient(); | 62 SyncClient(); |
59 virtual ~SyncClient(); | 63 virtual ~SyncClient(); |
60 | 64 |
61 // Initializes the sync client with the specified sync service. | 65 // Initializes the sync client with the specified sync service. |
62 virtual void Initialize() = 0; | 66 virtual void Initialize() = 0; |
63 | 67 |
| 68 // Returns SequencedWorkerPool to be used by ProfileSyncService for blocking |
| 69 // operations. |
| 70 virtual base::SequencedWorkerPool* GetBlockingPool() = 0; |
| 71 |
64 // Returns the current SyncService instance. | 72 // Returns the current SyncService instance. |
65 virtual SyncService* GetSyncService() = 0; | 73 virtual SyncService* GetSyncService() = 0; |
66 | 74 |
67 // Returns the current profile's preference service. | 75 // Returns the current profile's preference service. |
68 virtual PrefService* GetPrefService() = 0; | 76 virtual PrefService* GetPrefService() = 0; |
69 | 77 |
70 // Returns the path to the folder used for storing the local sync database. | 78 // Returns the path to the folder used for storing the local sync database. |
71 // It is only used when sync is running against a local backend. | 79 // It is only used when sync is running against a local backend. |
72 virtual base::FilePath GetLocalSyncBackendFolder() = 0; | 80 virtual base::FilePath GetLocalSyncBackendFolder() = 0; |
73 | 81 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 // Returns the current SyncApiComponentFactory instance. | 121 // Returns the current SyncApiComponentFactory instance. |
114 virtual SyncApiComponentFactory* GetSyncApiComponentFactory() = 0; | 122 virtual SyncApiComponentFactory* GetSyncApiComponentFactory() = 0; |
115 | 123 |
116 private: | 124 private: |
117 DISALLOW_COPY_AND_ASSIGN(SyncClient); | 125 DISALLOW_COPY_AND_ASSIGN(SyncClient); |
118 }; | 126 }; |
119 | 127 |
120 } // namespace syncer | 128 } // namespace syncer |
121 | 129 |
122 #endif // COMPONENTS_SYNC_DRIVER_SYNC_CLIENT_H_ | 130 #endif // COMPONENTS_SYNC_DRIVER_SYNC_CLIENT_H_ |
OLD | NEW |