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