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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
275 base::MakeUnique<UIDataTypeController>(syncer::PRIORITY_PREFERENCES, | 275 base::MakeUnique<UIDataTypeController>(syncer::PRIORITY_PREFERENCES, |
276 error_callback, sync_client_)); | 276 error_callback, sync_client_)); |
277 } | 277 } |
278 | 278 |
279 // Article sync is disabled by default. Register only if explicitly enabled. | 279 // Article sync is disabled by default. Register only if explicitly enabled. |
280 if (dom_distiller::IsEnableSyncArticlesSet()) { | 280 if (dom_distiller::IsEnableSyncArticlesSet()) { |
281 sync_service->RegisterDataTypeController( | 281 sync_service->RegisterDataTypeController( |
282 base::MakeUnique<UIDataTypeController>(syncer::ARTICLES, error_callback, | 282 base::MakeUnique<UIDataTypeController>(syncer::ARTICLES, error_callback, |
283 sync_client_)); | 283 sync_client_)); |
284 } | 284 } |
285 // Reading list sync is disabled by default. Register only if explicitly | |
286 // enabled. | |
287 if (!disabled_types.Has(syncer::READING_LIST)) { | |
jif
2016/11/07 12:30:51
Shouldn't it be:
// Reading list sync is enabled b
Olivier
2016/11/07 18:18:45
Done.
| |
288 sync_service->RegisterDataTypeController( | |
289 base::MakeUnique<ModelTypeController>( | |
290 syncer::READING_LIST, base::Bind(&base::debug::DumpWithoutCrashing), | |
291 sync_client_, base::ThreadTaskRunnerHandle::Get())); | |
292 } | |
285 } | 293 } |
286 | 294 |
287 DataTypeManager* ProfileSyncComponentsFactoryImpl::CreateDataTypeManager( | 295 DataTypeManager* ProfileSyncComponentsFactoryImpl::CreateDataTypeManager( |
288 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& | 296 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& |
289 debug_info_listener, | 297 debug_info_listener, |
290 const DataTypeController::TypeMap* controllers, | 298 const DataTypeController::TypeMap* controllers, |
291 const syncer::DataTypeEncryptionHandler* encryption_handler, | 299 const syncer::DataTypeEncryptionHandler* encryption_handler, |
292 syncer::SyncBackendHost* backend, | 300 syncer::SyncBackendHost* backend, |
293 DataTypeManagerObserver* observer) { | 301 DataTypeManagerObserver* observer) { |
294 return new DataTypeManagerImpl(debug_info_listener, controllers, | 302 return new DataTypeManagerImpl(debug_info_listener, controllers, |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
418 | 426 |
419 // static | 427 // static |
420 void ProfileSyncComponentsFactoryImpl::OverridePrefsForUssTest(bool use_uss) { | 428 void ProfileSyncComponentsFactoryImpl::OverridePrefsForUssTest(bool use_uss) { |
421 override_prefs_controller_to_uss_for_test_ = use_uss; | 429 override_prefs_controller_to_uss_for_test_ = use_uss; |
422 } | 430 } |
423 | 431 |
424 bool ProfileSyncComponentsFactoryImpl:: | 432 bool ProfileSyncComponentsFactoryImpl:: |
425 override_prefs_controller_to_uss_for_test_ = false; | 433 override_prefs_controller_to_uss_for_test_ = false; |
426 | 434 |
427 } // namespace browser_sync | 435 } // namespace browser_sync |
OLD | NEW |