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 27 matching lines...) Expand all Loading... |
38 #include "chrome/browser/sync/sessions/session_data_type_controller.h" | 38 #include "chrome/browser/sync/sessions/session_data_type_controller.h" |
39 #include "chrome/browser/themes/theme_service.h" | 39 #include "chrome/browser/themes/theme_service.h" |
40 #include "chrome/browser/themes/theme_service_factory.h" | 40 #include "chrome/browser/themes/theme_service_factory.h" |
41 #include "chrome/browser/themes/theme_syncable_service.h" | 41 #include "chrome/browser/themes/theme_syncable_service.h" |
42 #include "chrome/browser/webdata/web_data_service_factory.h" | 42 #include "chrome/browser/webdata/web_data_service_factory.h" |
43 #include "chrome/common/chrome_switches.h" | 43 #include "chrome/common/chrome_switches.h" |
44 #include "chrome/common/chrome_version_info.h" | 44 #include "chrome/common/chrome_version_info.h" |
45 #include "chrome/common/pref_names.h" | 45 #include "chrome/common/pref_names.h" |
46 #include "components/autofill/core/browser/webdata/autocomplete_syncable_service
.h" | 46 #include "components/autofill/core/browser/webdata/autocomplete_syncable_service
.h" |
47 #include "components/autofill/core/browser/webdata/autofill_profile_syncable_ser
vice.h" | 47 #include "components/autofill/core/browser/webdata/autofill_profile_syncable_ser
vice.h" |
| 48 #include "components/autofill/core/browser/webdata/autofill_wallet_metadata_sync
able_service.h" |
48 #include "components/autofill/core/browser/webdata/autofill_wallet_syncable_serv
ice.h" | 49 #include "components/autofill/core/browser/webdata/autofill_wallet_syncable_serv
ice.h" |
49 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" | 50 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" |
50 #include "components/autofill/core/common/autofill_pref_names.h" | 51 #include "components/autofill/core/common/autofill_pref_names.h" |
51 #include "components/autofill/core/common/autofill_switches.h" | 52 #include "components/autofill/core/common/autofill_switches.h" |
52 #include "components/dom_distiller/core/dom_distiller_service.h" | 53 #include "components/dom_distiller/core/dom_distiller_service.h" |
53 #include "components/history/core/browser/history_service.h" | 54 #include "components/history/core/browser/history_service.h" |
54 #include "components/password_manager/core/browser/password_store.h" | 55 #include "components/password_manager/core/browser/password_store.h" |
55 #include "components/search_engines/template_url_service.h" | 56 #include "components/search_engines/template_url_service.h" |
56 #include "components/signin/core/browser/signin_manager.h" | 57 #include "components/signin/core/browser/signin_manager.h" |
57 #include "components/sync_driver/data_type_manager_impl.h" | 58 #include "components/sync_driver/data_type_manager_impl.h" |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 case syncer::AUTOFILL_WALLET_METADATA: { | 513 case syncer::AUTOFILL_WALLET_METADATA: { |
513 if (!web_data_service_.get()) | 514 if (!web_data_service_.get()) |
514 return base::WeakPtr<syncer::SyncableService>(); | 515 return base::WeakPtr<syncer::SyncableService>(); |
515 if (type == syncer::AUTOFILL) { | 516 if (type == syncer::AUTOFILL) { |
516 return autofill::AutocompleteSyncableService::FromWebDataService( | 517 return autofill::AutocompleteSyncableService::FromWebDataService( |
517 web_data_service_.get())->AsWeakPtr(); | 518 web_data_service_.get())->AsWeakPtr(); |
518 } else if (type == syncer::AUTOFILL_PROFILE) { | 519 } else if (type == syncer::AUTOFILL_PROFILE) { |
519 return autofill::AutofillProfileSyncableService::FromWebDataService( | 520 return autofill::AutofillProfileSyncableService::FromWebDataService( |
520 web_data_service_.get())->AsWeakPtr(); | 521 web_data_service_.get())->AsWeakPtr(); |
521 } else if (type == syncer::AUTOFILL_WALLET_METADATA) { | 522 } else if (type == syncer::AUTOFILL_WALLET_METADATA) { |
522 return base::WeakPtr<syncer::SyncableService>(); | 523 return autofill::AutofillWalletMetadataSyncableService:: |
| 524 FromWebDataService(web_data_service_.get())->AsWeakPtr(); |
523 } | 525 } |
524 return autofill::AutofillWalletSyncableService::FromWebDataService( | 526 return autofill::AutofillWalletSyncableService::FromWebDataService( |
525 web_data_service_.get())->AsWeakPtr(); | 527 web_data_service_.get())->AsWeakPtr(); |
526 } | 528 } |
527 case syncer::SEARCH_ENGINES: | 529 case syncer::SEARCH_ENGINES: |
528 return TemplateURLServiceFactory::GetForProfile(profile_)->AsWeakPtr(); | 530 return TemplateURLServiceFactory::GetForProfile(profile_)->AsWeakPtr(); |
529 #if defined(ENABLE_EXTENSIONS) | 531 #if defined(ENABLE_EXTENSIONS) |
530 case syncer::APPS: | 532 case syncer::APPS: |
531 case syncer::EXTENSIONS: | 533 case syncer::EXTENSIONS: |
532 return ExtensionSyncService::Get(profile_)->AsWeakPtr(); | 534 return ExtensionSyncService::Get(profile_)->AsWeakPtr(); |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 new TypedUrlModelAssociator(profile_sync_service, | 741 new TypedUrlModelAssociator(profile_sync_service, |
740 history_backend, | 742 history_backend, |
741 error_handler); | 743 error_handler); |
742 TypedUrlChangeProcessor* change_processor = | 744 TypedUrlChangeProcessor* change_processor = |
743 new TypedUrlChangeProcessor(profile_, | 745 new TypedUrlChangeProcessor(profile_, |
744 model_associator, | 746 model_associator, |
745 history_backend, | 747 history_backend, |
746 error_handler); | 748 error_handler); |
747 return SyncComponents(model_associator, change_processor); | 749 return SyncComponents(model_associator, change_processor); |
748 } | 750 } |
OLD | NEW |