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 enabled by default. Register unless explicitly | |
278 // disabled. | |
279 if (!disabled_types.Has(syncer::READING_LIST)) { | |
280 sync_service->RegisterDataTypeController( | |
281 base::MakeUnique<ModelTypeController>( | |
282 syncer::READING_LIST, base::Bind(&base::debug::DumpWithoutCrashing), | |
pavely
2016/11/14 07:45:33
It's Ok to pass base::debug::DumpWithoutCrashing d
Olivier
2016/11/14 11:36:48
Directly switched to error_callback
| |
283 sync_client_, base::ThreadTaskRunnerHandle::Get())); | |
284 } | |
277 } | 285 } |
278 | 286 |
279 DataTypeManager* ProfileSyncComponentsFactoryImpl::CreateDataTypeManager( | 287 DataTypeManager* ProfileSyncComponentsFactoryImpl::CreateDataTypeManager( |
280 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& | 288 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& |
281 debug_info_listener, | 289 debug_info_listener, |
282 const DataTypeController::TypeMap* controllers, | 290 const DataTypeController::TypeMap* controllers, |
283 const syncer::DataTypeEncryptionHandler* encryption_handler, | 291 const syncer::DataTypeEncryptionHandler* encryption_handler, |
284 syncer::SyncBackendHost* backend, | 292 syncer::SyncBackendHost* backend, |
285 DataTypeManagerObserver* observer) { | 293 DataTypeManagerObserver* observer) { |
286 return new DataTypeManagerImpl(debug_info_listener, controllers, | 294 return new DataTypeManagerImpl(debug_info_listener, controllers, |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
410 | 418 |
411 // static | 419 // static |
412 void ProfileSyncComponentsFactoryImpl::OverridePrefsForUssTest(bool use_uss) { | 420 void ProfileSyncComponentsFactoryImpl::OverridePrefsForUssTest(bool use_uss) { |
413 override_prefs_controller_to_uss_for_test_ = use_uss; | 421 override_prefs_controller_to_uss_for_test_ = use_uss; |
414 } | 422 } |
415 | 423 |
416 bool ProfileSyncComponentsFactoryImpl:: | 424 bool ProfileSyncComponentsFactoryImpl:: |
417 override_prefs_controller_to_uss_for_test_ = false; | 425 override_prefs_controller_to_uss_for_test_ = false; |
418 | 426 |
419 } // namespace browser_sync | 427 } // namespace browser_sync |
OLD | NEW |