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/about_flags.h" | 7 #include "chrome/browser/about_flags.h" |
8 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 8 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
9 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h" | 9 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
11 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" | 11 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" |
12 #include "chrome/browser/extensions/api/storage/settings_frontend.h" | 12 #include "chrome/browser/extensions/api/storage/settings_sync_util.h" |
13 #include "chrome/browser/extensions/extension_service.h" | 13 #include "chrome/browser/extensions/extension_service.h" |
14 #include "chrome/browser/extensions/extension_sync_service.h" | 14 #include "chrome/browser/extensions/extension_sync_service.h" |
15 #include "chrome/browser/history/history_service.h" | 15 #include "chrome/browser/history/history_service.h" |
16 #include "chrome/browser/history/history_service_factory.h" | 16 #include "chrome/browser/history/history_service_factory.h" |
17 #include "chrome/browser/password_manager/password_store_factory.h" | 17 #include "chrome/browser/password_manager/password_store_factory.h" |
18 #include "chrome/browser/pref_service_flags_storage.h" | 18 #include "chrome/browser/pref_service_flags_storage.h" |
19 #include "chrome/browser/prefs/pref_model_associator.h" | 19 #include "chrome/browser/prefs/pref_model_associator.h" |
20 #include "chrome/browser/prefs/pref_service_syncable.h" | 20 #include "chrome/browser/prefs/pref_service_syncable.h" |
21 #include "chrome/browser/profiles/profile.h" | 21 #include "chrome/browser/profiles/profile.h" |
22 #include "chrome/browser/search_engines/template_url_service.h" | 22 #include "chrome/browser/search_engines/template_url_service.h" |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 web_data_service_.get())->AsWeakPtr(); | 464 web_data_service_.get())->AsWeakPtr(); |
465 } | 465 } |
466 } | 466 } |
467 case syncer::APPS: | 467 case syncer::APPS: |
468 case syncer::EXTENSIONS: | 468 case syncer::EXTENSIONS: |
469 return ExtensionSyncService::Get(profile_)->AsWeakPtr(); | 469 return ExtensionSyncService::Get(profile_)->AsWeakPtr(); |
470 case syncer::SEARCH_ENGINES: | 470 case syncer::SEARCH_ENGINES: |
471 return TemplateURLServiceFactory::GetForProfile(profile_)->AsWeakPtr(); | 471 return TemplateURLServiceFactory::GetForProfile(profile_)->AsWeakPtr(); |
472 case syncer::APP_SETTINGS: | 472 case syncer::APP_SETTINGS: |
473 case syncer::EXTENSION_SETTINGS: | 473 case syncer::EXTENSION_SETTINGS: |
474 return extensions::SettingsFrontend::Get(profile_) | 474 return extensions::settings_sync_util::GetSyncableService(profile_, type) |
475 ->GetBackendForSync(type) | |
476 ->AsWeakPtr(); | 475 ->AsWeakPtr(); |
477 #if defined(ENABLE_APP_LIST) | 476 #if defined(ENABLE_APP_LIST) |
478 case syncer::APP_LIST: | 477 case syncer::APP_LIST: |
479 return app_list::AppListSyncableServiceFactory::GetForProfile(profile_)-> | 478 return app_list::AppListSyncableServiceFactory::GetForProfile(profile_)-> |
480 AsWeakPtr(); | 479 AsWeakPtr(); |
481 #endif | 480 #endif |
482 #if defined(ENABLE_THEMES) | 481 #if defined(ENABLE_THEMES) |
483 case syncer::THEMES: | 482 case syncer::THEMES: |
484 return ThemeServiceFactory::GetForProfile(profile_)-> | 483 return ThemeServiceFactory::GetForProfile(profile_)-> |
485 GetThemeSyncableService()->AsWeakPtr(); | 484 GetThemeSyncableService()->AsWeakPtr(); |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 ProfileSyncComponentsFactory::SyncComponents | 608 ProfileSyncComponentsFactory::SyncComponents |
610 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( | 609 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( |
611 ProfileSyncService* profile_sync_service, | 610 ProfileSyncService* profile_sync_service, |
612 DataTypeErrorHandler* error_handler) { | 611 DataTypeErrorHandler* error_handler) { |
613 SessionModelAssociator* model_associator = | 612 SessionModelAssociator* model_associator = |
614 new SessionModelAssociator(profile_sync_service, error_handler); | 613 new SessionModelAssociator(profile_sync_service, error_handler); |
615 SessionChangeProcessor* change_processor = | 614 SessionChangeProcessor* change_processor = |
616 new SessionChangeProcessor(error_handler, model_associator); | 615 new SessionChangeProcessor(error_handler, model_associator); |
617 return SyncComponents(model_associator, change_processor); | 616 return SyncComponents(model_associator, change_processor); |
618 } | 617 } |
OLD | NEW |