| 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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 base::MakeUnique<UIDataTypeController>(syncer::PRIORITY_PREFERENCES, | 267 base::MakeUnique<UIDataTypeController>(syncer::PRIORITY_PREFERENCES, |
| 268 error_callback, sync_client_)); | 268 error_callback, sync_client_)); |
| 269 } | 269 } |
| 270 | 270 |
| 271 // Article sync is disabled by default. Register only if explicitly enabled. | 271 // Article sync is disabled by default. Register only if explicitly enabled. |
| 272 if (dom_distiller::IsEnableSyncArticlesSet()) { | 272 if (dom_distiller::IsEnableSyncArticlesSet()) { |
| 273 sync_service->RegisterDataTypeController( | 273 sync_service->RegisterDataTypeController( |
| 274 base::MakeUnique<UIDataTypeController>(syncer::ARTICLES, error_callback, | 274 base::MakeUnique<UIDataTypeController>(syncer::ARTICLES, error_callback, |
| 275 sync_client_)); | 275 sync_client_)); |
| 276 } | 276 } |
| 277 // Reading list sync is disabled by default. Register only if explicitly | |
| 278 // enabled. | |
| 279 if (enabled_types.Has(syncer::READING_LIST)) { | |
| 280 sync_service->RegisterDataTypeController( | |
| 281 base::MakeUnique<ModelTypeController>( | |
| 282 syncer::READING_LIST, error_callback, sync_client_, | |
| 283 base::ThreadTaskRunnerHandle::Get())); | |
| 284 } | |
| 285 } | 277 } |
| 286 | 278 |
| 287 DataTypeManager* ProfileSyncComponentsFactoryImpl::CreateDataTypeManager( | 279 DataTypeManager* ProfileSyncComponentsFactoryImpl::CreateDataTypeManager( |
| 288 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& | 280 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& |
| 289 debug_info_listener, | 281 debug_info_listener, |
| 290 const DataTypeController::TypeMap* controllers, | 282 const DataTypeController::TypeMap* controllers, |
| 291 const syncer::DataTypeEncryptionHandler* encryption_handler, | 283 const syncer::DataTypeEncryptionHandler* encryption_handler, |
| 292 syncer::SyncBackendHost* backend, | 284 syncer::SyncBackendHost* backend, |
| 293 DataTypeManagerObserver* observer) { | 285 DataTypeManagerObserver* observer) { |
| 294 return new DataTypeManagerImpl(debug_info_listener, controllers, | 286 return new DataTypeManagerImpl(debug_info_listener, controllers, |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 | 410 |
| 419 // static | 411 // static |
| 420 void ProfileSyncComponentsFactoryImpl::OverridePrefsForUssTest(bool use_uss) { | 412 void ProfileSyncComponentsFactoryImpl::OverridePrefsForUssTest(bool use_uss) { |
| 421 override_prefs_controller_to_uss_for_test_ = use_uss; | 413 override_prefs_controller_to_uss_for_test_ = use_uss; |
| 422 } | 414 } |
| 423 | 415 |
| 424 bool ProfileSyncComponentsFactoryImpl:: | 416 bool ProfileSyncComponentsFactoryImpl:: |
| 425 override_prefs_controller_to_uss_for_test_ = false; | 417 override_prefs_controller_to_uss_for_test_ = false; |
| 426 | 418 |
| 427 } // namespace browser_sync | 419 } // namespace browser_sync |
| OLD | NEW |