| 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 #include "chrome/browser/sync/glue/extensions_activity_monitor.h" | 11 #include "chrome/browser/sync/glue/extensions_activity_monitor.h" |
| 11 | 12 |
| 12 class Profile; | 13 class Profile; |
| 13 | 14 |
| 14 namespace sync_driver { | 15 namespace sync_driver { |
| 15 class SyncApiComponentFactory; | 16 class SyncApiComponentFactory; |
| 16 class SyncService; | 17 class SyncService; |
| 17 } | 18 } |
| (...skipping 15 matching lines...) Expand all Loading... |
| 33 PrefService* GetPrefService() override; | 34 PrefService* GetPrefService() override; |
| 34 bookmarks::BookmarkModel* GetBookmarkModel() override; | 35 bookmarks::BookmarkModel* GetBookmarkModel() override; |
| 35 favicon::FaviconService* GetFaviconService() override; | 36 favicon::FaviconService* GetFaviconService() override; |
| 36 history::HistoryService* GetHistoryService() override; | 37 history::HistoryService* GetHistoryService() override; |
| 37 scoped_refptr<password_manager::PasswordStore> GetPasswordStore() override; | 38 scoped_refptr<password_manager::PasswordStore> GetPasswordStore() override; |
| 38 base::Closure GetPasswordStateChangedCallback() override; | 39 base::Closure GetPasswordStateChangedCallback() override; |
| 39 autofill::PersonalDataManager* GetPersonalDataManager() override; | 40 autofill::PersonalDataManager* GetPersonalDataManager() override; |
| 40 scoped_refptr<autofill::AutofillWebDataService> GetWebDataService() override; | 41 scoped_refptr<autofill::AutofillWebDataService> GetWebDataService() override; |
| 41 BookmarkUndoService* GetBookmarkUndoServiceIfExists() override; | 42 BookmarkUndoService* GetBookmarkUndoServiceIfExists() override; |
| 42 scoped_refptr<syncer::ExtensionsActivity> GetExtensionsActivity() override; | 43 scoped_refptr<syncer::ExtensionsActivity> GetExtensionsActivity() override; |
| 44 sync_sessions::SyncSessionsClient* GetSyncSessionsClient() override; |
| 43 base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType( | 45 base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType( |
| 44 syncer::ModelType type) override; | 46 syncer::ModelType type) override; |
| 45 scoped_refptr<syncer::ModelSafeWorker> CreateModelWorkerForGroup( | 47 scoped_refptr<syncer::ModelSafeWorker> CreateModelWorkerForGroup( |
| 46 syncer::ModelSafeGroup group, | 48 syncer::ModelSafeGroup group, |
| 47 syncer::WorkerLoopDestructionObserver* observer) override; | 49 syncer::WorkerLoopDestructionObserver* observer) override; |
| 48 sync_driver::SyncApiComponentFactory* GetSyncApiComponentFactory() override; | 50 sync_driver::SyncApiComponentFactory* GetSyncApiComponentFactory() override; |
| 49 | 51 |
| 50 private: | 52 private: |
| 51 Profile* const profile_; | 53 Profile* const profile_; |
| 52 | 54 |
| 53 // The sync api component factory in use by this client. | 55 // The sync api component factory in use by this client. |
| 54 scoped_ptr<sync_driver::SyncApiComponentFactory> component_factory_; | 56 scoped_ptr<sync_driver::SyncApiComponentFactory> component_factory_; |
| 55 | 57 |
| 56 // Members that must be fetched on the UI thread but accessed on their | 58 // Members that must be fetched on the UI thread but accessed on their |
| 57 // respective backend threads. | 59 // respective backend threads. |
| 58 scoped_refptr<autofill::AutofillWebDataService> web_data_service_; | 60 scoped_refptr<autofill::AutofillWebDataService> web_data_service_; |
| 59 scoped_refptr<password_manager::PasswordStore> password_store_; | 61 scoped_refptr<password_manager::PasswordStore> password_store_; |
| 60 | 62 |
| 63 scoped_ptr<sync_sessions::SyncSessionsClient> sync_sessions_client_; |
| 64 |
| 61 // TODO(zea): this is a member only because Typed URLs needs access to | 65 // TODO(zea): this is a member only because Typed URLs needs access to |
| 62 // the UserShare and Cryptographer outside of the UI thread. Remove this | 66 // the UserShare and Cryptographer outside of the UI thread. Remove this |
| 63 // once that's no longer the case. | 67 // once that's no longer the case. |
| 64 // Note: not owned. | 68 // Note: not owned. |
| 65 sync_driver::SyncService* sync_service_; | 69 sync_driver::SyncService* sync_service_; |
| 66 | 70 |
| 67 // Generates and monitors the ExtensionsActivity object used by sync. | 71 // Generates and monitors the ExtensionsActivity object used by sync. |
| 68 ExtensionsActivityMonitor extensions_activity_monitor_; | 72 ExtensionsActivityMonitor extensions_activity_monitor_; |
| 73 |
| 74 DISALLOW_COPY_AND_ASSIGN(ChromeSyncClient); |
| 69 }; | 75 }; |
| 70 | 76 |
| 71 } // namespace browser_sync | 77 } // namespace browser_sync |
| 72 | 78 |
| 73 #endif // CHROME_BROWSER_SYNC_CHROME_SYNC_CLIENT_H__ | 79 #endif // CHROME_BROWSER_SYNC_CHROME_SYNC_CLIENT_H__ |
| OLD | NEW |