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 CHROME_BROWSER_SYNC_CHROME_SYNC_CLIENT_H__ | 5 #ifndef CHROME_BROWSER_SYNC_CHROME_SYNC_CLIENT_H__ |
6 #define CHROME_BROWSER_SYNC_CHROME_SYNC_CLIENT_H__ | 6 #define CHROME_BROWSER_SYNC_CHROME_SYNC_CLIENT_H__ |
7 | 7 |
| 8 #include "base/macros.h" |
8 #include "components/sync_driver/sync_client.h" | 9 #include "components/sync_driver/sync_client.h" |
9 | 10 |
10 class Profile; | 11 class Profile; |
11 | 12 |
12 namespace sync_driver { | 13 namespace sync_driver { |
13 class SyncApiComponentFactory; | 14 class SyncApiComponentFactory; |
14 class SyncService; | 15 class SyncService; |
15 } | 16 } |
16 | 17 |
17 namespace browser_sync { | 18 namespace browser_sync { |
(...skipping 11 matching lines...) Expand all Loading... |
29 // SyncClient implementation. | 30 // SyncClient implementation. |
30 sync_driver::SyncService* GetSyncService() override; | 31 sync_driver::SyncService* GetSyncService() override; |
31 PrefService* GetPrefService() override; | 32 PrefService* GetPrefService() override; |
32 bookmarks::BookmarkModel* GetBookmarkModel() override; | 33 bookmarks::BookmarkModel* GetBookmarkModel() override; |
33 favicon::FaviconService* GetFaviconService() override; | 34 favicon::FaviconService* GetFaviconService() override; |
34 history::HistoryService* GetHistoryService() override; | 35 history::HistoryService* GetHistoryService() override; |
35 scoped_refptr<password_manager::PasswordStore> GetPasswordStore() override; | 36 scoped_refptr<password_manager::PasswordStore> GetPasswordStore() override; |
36 autofill::PersonalDataManager* GetPersonalDataManager() override; | 37 autofill::PersonalDataManager* GetPersonalDataManager() override; |
37 scoped_refptr<autofill::AutofillWebDataService> GetWebDataService() override; | 38 scoped_refptr<autofill::AutofillWebDataService> GetWebDataService() override; |
38 BookmarkUndoService* GetBookmarkUndoServiceIfExists() override; | 39 BookmarkUndoService* GetBookmarkUndoServiceIfExists() override; |
| 40 sync_sessions::SyncSessionsClient* GetSyncSessionsClient() override; |
39 base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType( | 41 base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType( |
40 syncer::ModelType type) override; | 42 syncer::ModelType type) override; |
41 | 43 |
42 sync_driver::SyncApiComponentFactory* GetSyncApiComponentFactory() override; | 44 sync_driver::SyncApiComponentFactory* GetSyncApiComponentFactory() override; |
43 | 45 |
44 private: | 46 private: |
45 Profile* const profile_; | 47 Profile* const profile_; |
46 | 48 |
47 // The sync api component factory in use by this client. | 49 // The sync api component factory in use by this client. |
48 scoped_ptr<sync_driver::SyncApiComponentFactory> component_factory_; | 50 scoped_ptr<sync_driver::SyncApiComponentFactory> component_factory_; |
49 | 51 |
50 // Members that must be fetched on the UI thread but accessed on their | 52 // Members that must be fetched on the UI thread but accessed on their |
51 // respective backend threads. | 53 // respective backend threads. |
52 scoped_refptr<autofill::AutofillWebDataService> web_data_service_; | 54 scoped_refptr<autofill::AutofillWebDataService> web_data_service_; |
53 scoped_refptr<password_manager::PasswordStore> password_store_; | 55 scoped_refptr<password_manager::PasswordStore> password_store_; |
54 | 56 |
| 57 scoped_ptr<sync_sessions::SyncSessionsClient> sync_sessions_client_; |
| 58 |
55 // TODO(zea): this is a member only because Typed URLs needs access to | 59 // TODO(zea): this is a member only because Typed URLs needs access to |
56 // the UserShare and Cryptographer outside of the UI thread. Remove this | 60 // the UserShare and Cryptographer outside of the UI thread. Remove this |
57 // once that's no longer the case. | 61 // once that's no longer the case. |
58 // Note: not owned. | 62 // Note: not owned. |
59 sync_driver::SyncService* sync_service_; | 63 sync_driver::SyncService* sync_service_; |
| 64 |
| 65 DISALLOW_COPY_AND_ASSIGN(ChromeSyncClient); |
60 }; | 66 }; |
61 | 67 |
62 } // namespace browser_sync | 68 } // namespace browser_sync |
63 | 69 |
64 #endif // CHROME_BROWSER_SYNC_CHROME_SYNC_CLIENT_H__ | 70 #endif // CHROME_BROWSER_SYNC_CHROME_SYNC_CLIENT_H__ |
OLD | NEW |