OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "components/browser_sync/browser/profile_sync_test_util.h" | 5 #include "components/browser_sync/profile_sync_test_util.h" |
| 6 |
| 7 #include <utility> |
6 | 8 |
7 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
8 #include "components/bookmarks/browser/bookmark_model.h" | 10 #include "components/bookmarks/browser/bookmark_model.h" |
9 #include "components/history/core/browser/history_model_worker.h" | 11 #include "components/history/core/browser/history_model_worker.h" |
10 #include "components/pref_registry/pref_registry_syncable.h" | 12 #include "components/pref_registry/pref_registry_syncable.h" |
11 #include "components/signin/core/browser/signin_manager_base.h" | 13 #include "components/signin/core/browser/signin_manager_base.h" |
12 #include "components/sync/driver/glue/browser_thread_model_worker.h" | 14 #include "components/sync/driver/glue/browser_thread_model_worker.h" |
13 #include "components/sync/driver/glue/ui_model_worker.h" | 15 #include "components/sync/driver/glue/ui_model_worker.h" |
14 #include "components/sync/driver/signin_manager_wrapper.h" | 16 #include "components/sync/driver/signin_manager_wrapper.h" |
15 #include "components/sync/driver/sync_prefs.h" | 17 #include "components/sync/driver/sync_prefs.h" |
16 #include "components/sync/engine/passive_model_worker.h" | 18 #include "components/sync/engine/passive_model_worker.h" |
17 #include "net/url_request/url_request_test_util.h" | 19 #include "net/url_request/url_request_test_util.h" |
18 | 20 |
19 namespace browser_sync { | 21 namespace browser_sync { |
20 | 22 |
21 namespace { | 23 namespace { |
22 | 24 |
23 class BundleSyncClient : public sync_driver::FakeSyncClient { | 25 class BundleSyncClient : public sync_driver::FakeSyncClient { |
24 public: | 26 public: |
25 BundleSyncClient( | 27 BundleSyncClient(sync_driver::SyncApiComponentFactory* factory, |
26 sync_driver::SyncApiComponentFactory* factory, | 28 PrefService* pref_service, |
27 PrefService* pref_service, | 29 sync_sessions::SyncSessionsClient* sync_sessions_client, |
28 sync_sessions::SyncSessionsClient* sync_sessions_client, | 30 autofill::PersonalDataManager* personal_data_manager, |
29 autofill::PersonalDataManager* personal_data_manager, | 31 const base::Callback<base::WeakPtr<syncer::SyncableService>( |
30 const base::Callback<base::WeakPtr<syncer::SyncableService>( | 32 syncer::ModelType type)>& get_syncable_service_callback, |
31 syncer::ModelType type)>& get_syncable_service_callback, | 33 const base::Callback<sync_driver::SyncService*(void)>& |
32 const base::Callback<sync_driver::SyncService*(void)>& | 34 get_sync_service_callback, |
33 get_sync_service_callback, | 35 const base::Callback<bookmarks::BookmarkModel*(void)>& |
34 const base::Callback<bookmarks::BookmarkModel*(void)>& | 36 get_bookmark_model_callback, |
35 get_bookmark_model_callback, | 37 scoped_refptr<base::SingleThreadTaskRunner> db_thread, |
36 scoped_refptr<base::SingleThreadTaskRunner> db_thread, | 38 scoped_refptr<base::SingleThreadTaskRunner> file_thread, |
37 scoped_refptr<base::SingleThreadTaskRunner> file_thread, | 39 history::HistoryService* history_service); |
38 history::HistoryService* history_service); | |
39 | 40 |
40 ~BundleSyncClient() override; | 41 ~BundleSyncClient() override; |
41 | 42 |
42 PrefService* GetPrefService() override; | 43 PrefService* GetPrefService() override; |
43 sync_sessions::SyncSessionsClient* GetSyncSessionsClient() override; | 44 sync_sessions::SyncSessionsClient* GetSyncSessionsClient() override; |
44 autofill::PersonalDataManager* GetPersonalDataManager() override; | 45 autofill::PersonalDataManager* GetPersonalDataManager() override; |
45 base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType( | 46 base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType( |
46 syncer::ModelType type) override; | 47 syncer::ModelType type) override; |
47 sync_driver::SyncService* GetSyncService() override; | 48 sync_driver::SyncService* GetSyncService() override; |
48 scoped_refptr<syncer::ModelSafeWorker> CreateModelWorkerForGroup( | 49 scoped_refptr<syncer::ModelSafeWorker> CreateModelWorkerForGroup( |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 init_params.debug_identifier = "dummyDebugName"; | 267 init_params.debug_identifier = "dummyDebugName"; |
267 init_params.channel = version_info::Channel::UNKNOWN; | 268 init_params.channel = version_info::Channel::UNKNOWN; |
268 init_params.db_thread = db_thread_; | 269 init_params.db_thread = db_thread_; |
269 init_params.file_thread = base::ThreadTaskRunnerHandle::Get(); | 270 init_params.file_thread = base::ThreadTaskRunnerHandle::Get(); |
270 init_params.blocking_pool = worker_pool_owner_.pool().get(); | 271 init_params.blocking_pool = worker_pool_owner_.pool().get(); |
271 | 272 |
272 return init_params; | 273 return init_params; |
273 } | 274 } |
274 | 275 |
275 } // namespace browser_sync | 276 } // namespace browser_sync |
OLD | NEW |