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

Unified Diff: components/browser_sync/profile_sync_components_factory_impl.cc

Issue 2508263003: [sync] skeleton implementation of AutocompleteSyncBridge (Closed)
Patch Set: Max's comments; merged chrome_sync_client Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: components/browser_sync/profile_sync_components_factory_impl.cc
diff --git a/components/browser_sync/profile_sync_components_factory_impl.cc b/components/browser_sync/profile_sync_components_factory_impl.cc
index eae3dc111afd748975884e8723bf140fece6bf89..5e690b1e105234c76ee4d7780a27bc5a243bf3c4 100644
--- a/components/browser_sync/profile_sync_components_factory_impl.cc
+++ b/components/browser_sync/profile_sync_components_factory_impl.cc
@@ -153,15 +153,22 @@ void ProfileSyncComponentsFactoryImpl::RegisterCommonDataTypes(
sync_service->GetLocalDeviceInfoProvider()));
}
- // Autofill sync is enabled by default. Register unless explicitly
+ // Autocomplete sync is enabled by default. Register unless explicitly
// disabled.
if (!disabled_types.Has(syncer::AUTOFILL)) {
- sync_service->RegisterDataTypeController(
- base::MakeUnique<AutofillDataTypeController>(
- db_thread_, error_callback, sync_client_, web_data_service_));
+ if (base::FeatureList::IsEnabled(switches::kSyncUSSAutocomplete)) {
+ sync_service->RegisterDataTypeController(
+ base::MakeUnique<ModelTypeController>(
+ syncer::AUTOFILL, base::Bind(&base::debug::DumpWithoutCrashing),
+ sync_client_, db_thread_));
+ } else {
+ sync_service->RegisterDataTypeController(
+ base::MakeUnique<AutofillDataTypeController>(
+ db_thread_, error_callback, sync_client_, web_data_service_));
+ }
}
- // Autofill profile sync is enabled by default. Register unless explicitly
+ // Autofill sync is enabled by default. Register unless explicitly
// disabled.
if (!disabled_types.Has(syncer::AUTOFILL_PROFILE)) {
sync_service->RegisterDataTypeController(
« no previous file with comments | « components/autofill/core/browser/webdata/autocomplete_sync_bridge.cc ('k') | components/sync/driver/model_type_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698