| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/profile_sync_components_factory_impl.h" | 5 #include "components/browser_sync/profile_sync_components_factory_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/debug/dump_without_crashing.h" | 9 #include "base/debug/dump_without_crashing.h" |
| 10 #include "base/feature_list.h" | 10 #include "base/feature_list.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #include "components/history/core/browser/history_delete_directives_data_type_co
ntroller.h" | 23 #include "components/history/core/browser/history_delete_directives_data_type_co
ntroller.h" |
| 24 #include "components/history/core/browser/typed_url_data_type_controller.h" | 24 #include "components/history/core/browser/typed_url_data_type_controller.h" |
| 25 #include "components/password_manager/core/browser/password_store.h" | 25 #include "components/password_manager/core/browser/password_store.h" |
| 26 #include "components/password_manager/sync/browser/password_data_type_controller
.h" | 26 #include "components/password_manager/sync/browser/password_data_type_controller
.h" |
| 27 #include "components/prefs/pref_service.h" | 27 #include "components/prefs/pref_service.h" |
| 28 #include "components/reading_list/core/reading_list_switches.h" | 28 #include "components/reading_list/core/reading_list_switches.h" |
| 29 #include "components/sync/base/report_unrecoverable_error.h" | 29 #include "components/sync/base/report_unrecoverable_error.h" |
| 30 #include "components/sync/device_info/device_info_data_type_controller.h" | 30 #include "components/sync/device_info/device_info_data_type_controller.h" |
| 31 #include "components/sync/device_info/local_device_info_provider_impl.h" | 31 #include "components/sync/device_info/local_device_info_provider_impl.h" |
| 32 #include "components/sync/driver/data_type_manager_impl.h" | 32 #include "components/sync/driver/data_type_manager_impl.h" |
| 33 #include "components/sync/driver/glue/sync_backend_host.h" | |
| 34 #include "components/sync/driver/glue/sync_backend_host_impl.h" | 33 #include "components/sync/driver/glue/sync_backend_host_impl.h" |
| 35 #include "components/sync/driver/model_type_controller.h" | 34 #include "components/sync/driver/model_type_controller.h" |
| 36 #include "components/sync/driver/non_ui_data_type_controller.h" | 35 #include "components/sync/driver/non_ui_data_type_controller.h" |
| 37 #include "components/sync/driver/proxy_data_type_controller.h" | 36 #include "components/sync/driver/proxy_data_type_controller.h" |
| 38 #include "components/sync/driver/sync_client.h" | 37 #include "components/sync/driver/sync_client.h" |
| 39 #include "components/sync/driver/sync_driver_switches.h" | 38 #include "components/sync/driver/sync_driver_switches.h" |
| 40 #include "components/sync/engine/attachments/attachment_downloader.h" | 39 #include "components/sync/engine/attachments/attachment_downloader.h" |
| 41 #include "components/sync/engine/attachments/attachment_uploader.h" | 40 #include "components/sync/engine/attachments/attachment_uploader.h" |
| 41 #include "components/sync/engine/sync_engine.h" |
| 42 #include "components/sync/model/attachments/attachment_service.h" | 42 #include "components/sync/model/attachments/attachment_service.h" |
| 43 #include "components/sync_bookmarks/bookmark_change_processor.h" | 43 #include "components/sync_bookmarks/bookmark_change_processor.h" |
| 44 #include "components/sync_bookmarks/bookmark_data_type_controller.h" | 44 #include "components/sync_bookmarks/bookmark_data_type_controller.h" |
| 45 #include "components/sync_bookmarks/bookmark_model_associator.h" | 45 #include "components/sync_bookmarks/bookmark_model_associator.h" |
| 46 #include "components/sync_sessions/session_data_type_controller.h" | 46 #include "components/sync_sessions/session_data_type_controller.h" |
| 47 #include "google_apis/gaia/oauth2_token_service.h" | 47 #include "google_apis/gaia/oauth2_token_service.h" |
| 48 #include "google_apis/gaia/oauth2_token_service_request.h" | 48 #include "google_apis/gaia/oauth2_token_service_request.h" |
| 49 #include "net/url_request/url_request_context_getter.h" | 49 #include "net/url_request/url_request_context_getter.h" |
| 50 | 50 |
| 51 using bookmarks::BookmarkModel; | 51 using bookmarks::BookmarkModel; |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 base::MakeUnique<ModelTypeController>( | 294 base::MakeUnique<ModelTypeController>( |
| 295 syncer::READING_LIST, error_callback, sync_client_, ui_thread_)); | 295 syncer::READING_LIST, error_callback, sync_client_, ui_thread_)); |
| 296 } | 296 } |
| 297 } | 297 } |
| 298 | 298 |
| 299 DataTypeManager* ProfileSyncComponentsFactoryImpl::CreateDataTypeManager( | 299 DataTypeManager* ProfileSyncComponentsFactoryImpl::CreateDataTypeManager( |
| 300 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& | 300 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& |
| 301 debug_info_listener, | 301 debug_info_listener, |
| 302 const DataTypeController::TypeMap* controllers, | 302 const DataTypeController::TypeMap* controllers, |
| 303 const syncer::DataTypeEncryptionHandler* encryption_handler, | 303 const syncer::DataTypeEncryptionHandler* encryption_handler, |
| 304 syncer::SyncBackendHost* backend, | 304 syncer::SyncEngine* engine, |
| 305 DataTypeManagerObserver* observer) { | 305 DataTypeManagerObserver* observer) { |
| 306 return new DataTypeManagerImpl(debug_info_listener, controllers, | 306 return new DataTypeManagerImpl(debug_info_listener, controllers, |
| 307 encryption_handler, backend, observer); | 307 encryption_handler, engine, observer); |
| 308 } | 308 } |
| 309 | 309 |
| 310 syncer::SyncBackendHost* | 310 syncer::SyncEngine* ProfileSyncComponentsFactoryImpl::CreateSyncEngine( |
| 311 ProfileSyncComponentsFactoryImpl::CreateSyncBackendHost( | |
| 312 const std::string& name, | 311 const std::string& name, |
| 313 invalidation::InvalidationService* invalidator, | 312 invalidation::InvalidationService* invalidator, |
| 314 const base::WeakPtr<syncer::SyncPrefs>& sync_prefs, | 313 const base::WeakPtr<syncer::SyncPrefs>& sync_prefs, |
| 315 const base::FilePath& sync_folder) { | 314 const base::FilePath& sync_folder) { |
| 316 return new syncer::SyncBackendHostImpl(name, sync_client_, invalidator, | 315 return new syncer::SyncBackendHostImpl(name, sync_client_, invalidator, |
| 317 sync_prefs, sync_folder); | 316 sync_prefs, sync_folder); |
| 318 } | 317 } |
| 319 | 318 |
| 320 std::unique_ptr<syncer::LocalDeviceInfoProvider> | 319 std::unique_ptr<syncer::LocalDeviceInfoProvider> |
| 321 ProfileSyncComponentsFactoryImpl::CreateLocalDeviceInfoProvider() { | 320 ProfileSyncComponentsFactoryImpl::CreateLocalDeviceInfoProvider() { |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 | 429 |
| 431 // static | 430 // static |
| 432 void ProfileSyncComponentsFactoryImpl::OverridePrefsForUssTest(bool use_uss) { | 431 void ProfileSyncComponentsFactoryImpl::OverridePrefsForUssTest(bool use_uss) { |
| 433 override_prefs_controller_to_uss_for_test_ = use_uss; | 432 override_prefs_controller_to_uss_for_test_ = use_uss; |
| 434 } | 433 } |
| 435 | 434 |
| 436 bool ProfileSyncComponentsFactoryImpl:: | 435 bool ProfileSyncComponentsFactoryImpl:: |
| 437 override_prefs_controller_to_uss_for_test_ = false; | 436 override_prefs_controller_to_uss_for_test_ = false; |
| 438 | 437 |
| 439 } // namespace browser_sync | 438 } // namespace browser_sync |
| OLD | NEW |