Chromium Code Reviews| Index: chrome/browser/sync/profile_sync_factory_impl.cc |
| diff --git a/chrome/browser/sync/profile_sync_factory_impl.cc b/chrome/browser/sync/profile_sync_factory_impl.cc |
| index 6f0fba526cc5ea4b21725195f521699e0289bae1..6bbff29b65cb2e160c26c0d8fe7fe5fc50d6c717 100644 |
| --- a/chrome/browser/sync/profile_sync_factory_impl.cc |
| +++ b/chrome/browser/sync/profile_sync_factory_impl.cc |
| @@ -8,9 +8,12 @@ |
| #include "chrome/browser/sync/glue/app_data_type_controller.h" |
| #include "chrome/browser/sync/glue/autofill_change_processor.h" |
| #include "chrome/browser/sync/glue/autofill_change_processor2.h" |
| +#include "chrome/browser/sync/glue/autofill_profile_change_processor.h" |
| #include "chrome/browser/sync/glue/autofill_data_type_controller.h" |
| +#include "chrome/browser/sync/glue/autofill_profile_data_type_controller.h" |
|
tim (not reviewing)
2010/12/13 19:24:33
alphabetical
lipalani
2010/12/15 09:08:33
Done.
|
| #include "chrome/browser/sync/glue/autofill_model_associator.h" |
| #include "chrome/browser/sync/glue/autofill_model_associator2.h" |
| +#include "chrome/browser/sync/glue/autofill_profile_model_associator.h" |
| #include "chrome/browser/sync/glue/bookmark_change_processor.h" |
| #include "chrome/browser/sync/glue/bookmark_data_type_controller.h" |
| #include "chrome/browser/sync/glue/bookmark_model_associator.h" |
| @@ -39,13 +42,17 @@ |
| #include "chrome/browser/sync/profile_sync_factory_impl.h" |
| #include "chrome/browser/webdata/web_data_service.h" |
| #include "chrome/common/chrome_switches.h" |
| +#include "chrome/common/pref_names.h" |
| using browser_sync::AppDataTypeController; |
| using browser_sync::AutofillChangeProcessor; |
| using browser_sync::AutofillChangeProcessor2; |
| +using browser_sync::AutofillProfileChangeProcessor; |
| using browser_sync::AutofillDataTypeController; |
| +using browser_sync::AutofillProfileDataTypeController; |
| using browser_sync::AutofillModelAssociator; |
| using browser_sync::AutofillModelAssociator2; |
| +using browser_sync::AutofillProfileModelAssociator; |
| using browser_sync::BookmarkChangeProcessor; |
| using browser_sync::BookmarkDataTypeController; |
| using browser_sync::BookmarkModelAssociator; |
| @@ -146,6 +153,12 @@ ProfileSyncService* ProfileSyncFactoryImpl::CreateProfileSyncService( |
| pss->RegisterDataTypeController( |
| new SessionDataTypeController(this, pss)); |
| } |
| + |
| + if (!command_line_->HasSwitch(switches::kDisableSyncAutofillProfile) && |
| + command_line_->HasSwitch(switches::kEnableSyncNewAutofill)) { |
| + pss->RegisterDataTypeController(new AutofillProfileDataTypeController( |
| + this, profile_, pss)); |
| + } |
| return pss; |
| } |
| @@ -170,6 +183,8 @@ ProfileSyncFactoryImpl::CreateAppSyncComponents( |
| return SyncComponents(model_associator, change_processor); |
| } |
| + |
|
tim (not reviewing)
2010/12/13 19:24:33
extra newlines
lipalani
2010/12/14 21:05:57
Done.
|
| + |
| ProfileSyncFactory::SyncComponents |
| ProfileSyncFactoryImpl::CreateAutofillSyncComponents( |
| ProfileSyncService* profile_sync_service, |
| @@ -203,6 +218,25 @@ ProfileSyncFactoryImpl::CreateAutofillSyncComponents( |
| } |
| ProfileSyncFactory::SyncComponents |
| +ProfileSyncFactoryImpl::CreateAutofillProfileSyncComponents( |
| + ProfileSyncService* profile_sync_service, |
| + WebDatabase* web_database, |
| + PersonalDataManager* personal_data, |
| + browser_sync::UnrecoverableErrorHandler* error_handler) { |
| + |
| + AutofillProfileModelAssociator* model_associator = |
| + new AutofillProfileModelAssociator(profile_sync_service, |
| + web_database, |
| + personal_data); |
| + AutofillProfileChangeProcessor* change_processor = |
| + new AutofillProfileChangeProcessor(model_associator, |
| + web_database, |
| + personal_data, |
| + error_handler); |
| + return SyncComponents(model_associator, change_processor); |
| +} |
| + |
| +ProfileSyncFactory::SyncComponents |
| ProfileSyncFactoryImpl::CreateBookmarkSyncComponents( |
| ProfileSyncService* profile_sync_service, |
| UnrecoverableErrorHandler* error_handler) { |