Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(343)

Side by Side Diff: components/browser_sync/profile_sync_components_factory_impl.cc

Issue 2511723002: Enable RL sync by default on iOS (Closed)
Patch Set: rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/browser_sync/DEPS ('k') | components/reading_list/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 #include "base/memory/ptr_util.h" 11 #include "base/memory/ptr_util.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/threading/thread_task_runner_handle.h" 13 #include "base/threading/thread_task_runner_handle.h"
14 #include "build/build_config.h" 14 #include "build/build_config.h"
15 #include "components/autofill/core/browser/autofill_wallet_data_type_controller. h" 15 #include "components/autofill/core/browser/autofill_wallet_data_type_controller. h"
16 #include "components/autofill/core/browser/webdata/autofill_data_type_controller .h" 16 #include "components/autofill/core/browser/webdata/autofill_data_type_controller .h"
17 #include "components/autofill/core/browser/webdata/autofill_profile_data_type_co ntroller.h" 17 #include "components/autofill/core/browser/webdata/autofill_profile_data_type_co ntroller.h"
18 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" 18 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
19 #include "components/autofill/core/common/autofill_pref_names.h" 19 #include "components/autofill/core/common/autofill_pref_names.h"
20 #include "components/autofill/core/common/autofill_switches.h" 20 #include "components/autofill/core/common/autofill_switches.h"
21 #include "components/browser_sync/browser_sync_switches.h" 21 #include "components/browser_sync/browser_sync_switches.h"
22 #include "components/browser_sync/profile_sync_service.h" 22 #include "components/browser_sync/profile_sync_service.h"
23 #include "components/dom_distiller/core/dom_distiller_features.h" 23 #include "components/dom_distiller/core/dom_distiller_features.h"
24 #include "components/history/core/browser/history_delete_directives_data_type_co ntroller.h" 24 #include "components/history/core/browser/history_delete_directives_data_type_co ntroller.h"
25 #include "components/history/core/browser/typed_url_data_type_controller.h" 25 #include "components/history/core/browser/typed_url_data_type_controller.h"
26 #include "components/password_manager/core/browser/password_store.h" 26 #include "components/password_manager/core/browser/password_store.h"
27 #include "components/password_manager/sync/browser/password_data_type_controller .h" 27 #include "components/password_manager/sync/browser/password_data_type_controller .h"
28 #include "components/prefs/pref_service.h" 28 #include "components/prefs/pref_service.h"
29 #include "components/reading_list/core/reading_list_switches.h"
29 #include "components/sync/base/report_unrecoverable_error.h" 30 #include "components/sync/base/report_unrecoverable_error.h"
30 #include "components/sync/device_info/device_info_data_type_controller.h" 31 #include "components/sync/device_info/device_info_data_type_controller.h"
31 #include "components/sync/device_info/local_device_info_provider_impl.h" 32 #include "components/sync/device_info/local_device_info_provider_impl.h"
32 #include "components/sync/driver/data_type_manager_impl.h" 33 #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.h"
34 #include "components/sync/driver/glue/sync_backend_host_impl.h" 35 #include "components/sync/driver/glue/sync_backend_host_impl.h"
35 #include "components/sync/driver/model_type_controller.h" 36 #include "components/sync/driver/model_type_controller.h"
36 #include "components/sync/driver/proxy_data_type_controller.h" 37 #include "components/sync/driver/proxy_data_type_controller.h"
37 #include "components/sync/driver/sync_client.h" 38 #include "components/sync/driver/sync_client.h"
38 #include "components/sync/driver/sync_driver_switches.h" 39 #include "components/sync/driver/sync_driver_switches.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 base::MakeUnique<UIDataTypeController>(syncer::PRIORITY_PREFERENCES, 268 base::MakeUnique<UIDataTypeController>(syncer::PRIORITY_PREFERENCES,
268 error_callback, sync_client_)); 269 error_callback, sync_client_));
269 } 270 }
270 271
271 // Article sync is disabled by default. Register only if explicitly enabled. 272 // Article sync is disabled by default. Register only if explicitly enabled.
272 if (dom_distiller::IsEnableSyncArticlesSet()) { 273 if (dom_distiller::IsEnableSyncArticlesSet()) {
273 sync_service->RegisterDataTypeController( 274 sync_service->RegisterDataTypeController(
274 base::MakeUnique<UIDataTypeController>(syncer::ARTICLES, error_callback, 275 base::MakeUnique<UIDataTypeController>(syncer::ARTICLES, error_callback,
275 sync_client_)); 276 sync_client_));
276 } 277 }
277 // Reading list sync is disabled by default. Register only if explicitly 278
278 // enabled. 279 // Reading list sync is enabled by default only on iOS. Register unless
279 if (enabled_types.Has(syncer::READING_LIST)) { 280 // Reading List or Reading List Sync is explicitly disabled.
281 if (!disabled_types.Has(syncer::READING_LIST) &&
282 reading_list::switches::IsReadingListEnabled()) {
280 sync_service->RegisterDataTypeController( 283 sync_service->RegisterDataTypeController(
281 base::MakeUnique<ModelTypeController>( 284 base::MakeUnique<ModelTypeController>(
282 syncer::READING_LIST, error_callback, sync_client_, 285 syncer::READING_LIST, error_callback, sync_client_,
283 base::ThreadTaskRunnerHandle::Get())); 286 base::ThreadTaskRunnerHandle::Get()));
284 } 287 }
285 } 288 }
286 289
287 DataTypeManager* ProfileSyncComponentsFactoryImpl::CreateDataTypeManager( 290 DataTypeManager* ProfileSyncComponentsFactoryImpl::CreateDataTypeManager(
288 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& 291 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>&
289 debug_info_listener, 292 debug_info_listener,
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 421
419 // static 422 // static
420 void ProfileSyncComponentsFactoryImpl::OverridePrefsForUssTest(bool use_uss) { 423 void ProfileSyncComponentsFactoryImpl::OverridePrefsForUssTest(bool use_uss) {
421 override_prefs_controller_to_uss_for_test_ = use_uss; 424 override_prefs_controller_to_uss_for_test_ = use_uss;
422 } 425 }
423 426
424 bool ProfileSyncComponentsFactoryImpl:: 427 bool ProfileSyncComponentsFactoryImpl::
425 override_prefs_controller_to_uss_for_test_ = false; 428 override_prefs_controller_to_uss_for_test_ = false;
426 429
427 } // namespace browser_sync 430 } // namespace browser_sync
OLDNEW
« no previous file with comments | « components/browser_sync/DEPS ('k') | components/reading_list/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698