Chromium Code Reviews| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 148 } else { | 148 } else { |
| 149 sync_service->RegisterDataTypeController( | 149 sync_service->RegisterDataTypeController( |
| 150 base::MakeUnique<DeviceInfoDataTypeController>( | 150 base::MakeUnique<DeviceInfoDataTypeController>( |
| 151 error_callback, sync_client_, | 151 error_callback, sync_client_, |
| 152 sync_service->GetLocalDeviceInfoProvider())); | 152 sync_service->GetLocalDeviceInfoProvider())); |
| 153 } | 153 } |
| 154 | 154 |
| 155 // Autofill sync is enabled by default. Register unless explicitly | 155 // Autofill sync is enabled by default. Register unless explicitly |
| 156 // disabled. | 156 // disabled. |
| 157 if (!disabled_types.Has(syncer::AUTOFILL)) { | 157 if (!disabled_types.Has(syncer::AUTOFILL)) { |
| 158 sync_service->RegisterDataTypeController( | 158 if (base::FeatureList::IsEnabled(switches::kSyncUSSAutocomplete)) { |
| 159 base::MakeUnique<AutofillDataTypeController>( | 159 sync_service->RegisterDataTypeController( |
| 160 db_thread_, error_callback, sync_client_, web_data_service_)); | 160 base::MakeUnique<ModelTypeController>( |
| 161 syncer::AUTOFILL, base::Bind(&base::debug::DumpWithoutCrashing), | |
| 162 sync_client_, db_thread_)); | |
| 163 // db_thread_, error_callback, sync_client_, web_data_service_)); | |
|
maxbogue
2016/11/18 22:22:36
Guessing you didn't mean to leave this line in.
Patrick Noland
2016/11/22 18:51:04
Done.
| |
| 164 } else { | |
| 165 sync_service->RegisterDataTypeController( | |
| 166 base::MakeUnique<AutofillDataTypeController>( | |
| 167 db_thread_, error_callback, sync_client_, web_data_service_)); | |
| 168 } | |
| 161 } | 169 } |
| 162 | 170 |
| 163 // Autofill profile sync is enabled by default. Register unless explicitly | 171 // Autofill profile sync is enabled by default. Register unless explicitly |
| 164 // disabled. | 172 // disabled. |
| 165 if (!disabled_types.Has(syncer::AUTOFILL_PROFILE)) { | 173 if (!disabled_types.Has(syncer::AUTOFILL_PROFILE)) { |
| 166 sync_service->RegisterDataTypeController( | 174 sync_service->RegisterDataTypeController( |
| 167 base::MakeUnique<AutofillProfileDataTypeController>( | 175 base::MakeUnique<AutofillProfileDataTypeController>( |
| 168 db_thread_, error_callback, sync_client_, web_data_service_)); | 176 db_thread_, error_callback, sync_client_, web_data_service_)); |
| 169 } | 177 } |
| 170 | 178 |
| (...skipping 247 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 |