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

Side by Side 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 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
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"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 base::MakeUnique<ModelTypeController>( 146 base::MakeUnique<ModelTypeController>(
147 syncer::DEVICE_INFO, base::Bind(&base::debug::DumpWithoutCrashing), 147 syncer::DEVICE_INFO, base::Bind(&base::debug::DumpWithoutCrashing),
148 sync_client_, base::ThreadTaskRunnerHandle::Get())); 148 sync_client_, base::ThreadTaskRunnerHandle::Get()));
149 } else { 149 } else {
150 sync_service->RegisterDataTypeController( 150 sync_service->RegisterDataTypeController(
151 base::MakeUnique<DeviceInfoDataTypeController>( 151 base::MakeUnique<DeviceInfoDataTypeController>(
152 error_callback, sync_client_, 152 error_callback, sync_client_,
153 sync_service->GetLocalDeviceInfoProvider())); 153 sync_service->GetLocalDeviceInfoProvider()));
154 } 154 }
155 155
156 // Autocomplete sync is enabled by default. Register unless explicitly
157 // disabled.
158 if (!disabled_types.Has(syncer::AUTOFILL)) {
159 if (base::FeatureList::IsEnabled(switches::kSyncUSSAutocomplete)) {
160 sync_service->RegisterDataTypeController(
161 base::MakeUnique<ModelTypeController>(
162 syncer::AUTOFILL, base::Bind(&base::debug::DumpWithoutCrashing),
163 sync_client_, db_thread_));
164 } else {
165 sync_service->RegisterDataTypeController(
166 base::MakeUnique<AutofillDataTypeController>(
167 db_thread_, error_callback, sync_client_, web_data_service_));
168 }
169 }
170
156 // Autofill sync is enabled by default. Register unless explicitly 171 // Autofill sync is enabled by default. Register unless explicitly
157 // disabled. 172 // disabled.
158 if (!disabled_types.Has(syncer::AUTOFILL)) {
159 sync_service->RegisterDataTypeController(
160 base::MakeUnique<AutofillDataTypeController>(
161 db_thread_, error_callback, sync_client_, web_data_service_));
162 }
163
164 // Autofill profile sync is enabled by default. Register unless explicitly
165 // disabled.
166 if (!disabled_types.Has(syncer::AUTOFILL_PROFILE)) { 173 if (!disabled_types.Has(syncer::AUTOFILL_PROFILE)) {
167 sync_service->RegisterDataTypeController( 174 sync_service->RegisterDataTypeController(
168 base::MakeUnique<AutofillProfileDataTypeController>( 175 base::MakeUnique<AutofillProfileDataTypeController>(
169 db_thread_, error_callback, sync_client_, web_data_service_)); 176 db_thread_, error_callback, sync_client_, web_data_service_));
170 } 177 }
171 178
172 // Wallet data sync is enabled by default, but behind a syncer experiment 179 // Wallet data sync is enabled by default, but behind a syncer experiment
173 // enforced by the datatype controller. Register unless explicitly disabled. 180 // enforced by the datatype controller. Register unless explicitly disabled.
174 bool wallet_disabled = disabled_types.Has(syncer::AUTOFILL_WALLET_DATA); 181 bool wallet_disabled = disabled_types.Has(syncer::AUTOFILL_WALLET_DATA);
175 if (!wallet_disabled) { 182 if (!wallet_disabled) {
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 428
422 // static 429 // static
423 void ProfileSyncComponentsFactoryImpl::OverridePrefsForUssTest(bool use_uss) { 430 void ProfileSyncComponentsFactoryImpl::OverridePrefsForUssTest(bool use_uss) {
424 override_prefs_controller_to_uss_for_test_ = use_uss; 431 override_prefs_controller_to_uss_for_test_ = use_uss;
425 } 432 }
426 433
427 bool ProfileSyncComponentsFactoryImpl:: 434 bool ProfileSyncComponentsFactoryImpl::
428 override_prefs_controller_to_uss_for_test_ = false; 435 override_prefs_controller_to_uss_for_test_ = false;
429 436
430 } // namespace browser_sync 437 } // namespace browser_sync
OLDNEW
« 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