| 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "build/build_config.h" | 6 #include "build/build_config.h" |
| 7 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 7 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| 8 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h" | 8 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h" |
| 9 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" | 9 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" |
| 10 #include "chrome/browser/history/history_service_factory.h" | 10 #include "chrome/browser/history/history_service_factory.h" |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 new AutofillDataTypeController(this, profile_)); | 222 new AutofillDataTypeController(this, profile_)); |
| 223 } | 223 } |
| 224 | 224 |
| 225 // Autofill profile sync is enabled by default. Register unless explicitly | 225 // Autofill profile sync is enabled by default. Register unless explicitly |
| 226 // disabled. | 226 // disabled. |
| 227 if (!disabled_types.Has(syncer::AUTOFILL_PROFILE)) { | 227 if (!disabled_types.Has(syncer::AUTOFILL_PROFILE)) { |
| 228 pss->RegisterDataTypeController( | 228 pss->RegisterDataTypeController( |
| 229 new AutofillProfileDataTypeController(this, profile_)); | 229 new AutofillProfileDataTypeController(this, profile_)); |
| 230 } | 230 } |
| 231 | 231 |
| 232 if (profile_->GetPrefs()->GetBoolean( | 232 // Autofill wallet sync is enabled by default, but behind a syncer experiment |
| 233 autofill::prefs::kAutofillWalletSyncExperimentEnabled) && | 233 // enforced by the datatype controller. Register unless explicitly disabled. |
| 234 !disabled_types.Has(syncer::AUTOFILL_WALLET_DATA)) { | 234 if (!disabled_types.Has(syncer::AUTOFILL_WALLET_DATA)) { |
| 235 // The feature can be enabled by sync experiment *or* command line flag, | |
| 236 // and additionally the sync type must be enabled. | |
| 237 pss->RegisterDataTypeController( | 235 pss->RegisterDataTypeController( |
| 238 new browser_sync::AutofillWalletDataTypeController(this, profile_)); | 236 new browser_sync::AutofillWalletDataTypeController(this, profile_)); |
| 239 } | 237 } |
| 240 | 238 |
| 241 // Bookmark sync is enabled by default. Register unless explicitly | 239 // Bookmark sync is enabled by default. Register unless explicitly |
| 242 // disabled. | 240 // disabled. |
| 243 if (!disabled_types.Has(syncer::BOOKMARKS)) { | 241 if (!disabled_types.Has(syncer::BOOKMARKS)) { |
| 244 pss->RegisterDataTypeController( | 242 pss->RegisterDataTypeController( |
| 245 new BookmarkDataTypeController(this, profile_, pss)); | 243 new BookmarkDataTypeController(this, profile_, pss)); |
| 246 } | 244 } |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 new TypedUrlModelAssociator(profile_sync_service, | 726 new TypedUrlModelAssociator(profile_sync_service, |
| 729 history_backend, | 727 history_backend, |
| 730 error_handler); | 728 error_handler); |
| 731 TypedUrlChangeProcessor* change_processor = | 729 TypedUrlChangeProcessor* change_processor = |
| 732 new TypedUrlChangeProcessor(profile_, | 730 new TypedUrlChangeProcessor(profile_, |
| 733 model_associator, | 731 model_associator, |
| 734 history_backend, | 732 history_backend, |
| 735 error_handler); | 733 error_handler); |
| 736 return SyncComponents(model_associator, change_processor); | 734 return SyncComponents(model_associator, change_processor); |
| 737 } | 735 } |
| OLD | NEW |