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/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/extensions/api/storage/settings_frontend.h" | 10 #include "chrome/browser/extensions/api/storage/settings_frontend.h" |
11 #include "chrome/browser/extensions/extension_service.h" | 11 #include "chrome/browser/extensions/extension_service.h" |
12 #include "chrome/browser/extensions/extension_system.h" | 12 #include "chrome/browser/extensions/extension_system.h" |
13 #include "chrome/browser/extensions/extension_system_factory.h" | 13 #include "chrome/browser/extensions/extension_system_factory.h" |
14 #include "chrome/browser/history/history_service.h" | 14 #include "chrome/browser/history/history_service.h" |
15 #include "chrome/browser/history/history_service_factory.h" | 15 #include "chrome/browser/history/history_service_factory.h" |
16 #include "chrome/browser/pref_service_flags_storage.h" | 16 #include "chrome/browser/pref_service_flags_storage.h" |
17 #include "chrome/browser/prefs/pref_model_associator.h" | 17 #include "chrome/browser/prefs/pref_model_associator.h" |
18 #include "chrome/browser/prefs/pref_service_syncable.h" | 18 #include "chrome/browser/prefs/pref_service_syncable.h" |
19 #include "chrome/browser/profiles/profile.h" | 19 #include "chrome/browser/profiles/profile.h" |
20 #include "chrome/browser/search_engines/template_url_service.h" | 20 #include "chrome/browser/search_engines/template_url_service.h" |
21 #include "chrome/browser/search_engines/template_url_service_factory.h" | 21 #include "chrome/browser/search_engines/template_url_service_factory.h" |
22 #include "chrome/browser/signin/signin_manager.h" | 22 #include "chrome/browser/signin/signin_manager.h" |
23 #include "chrome/browser/signin/signin_manager_factory.h" | 23 #include "chrome/browser/signin/signin_manager_factory.h" |
24 #include "chrome/browser/spellchecker/spellcheck_factory.h" | |
25 #include "chrome/browser/spellchecker/spellcheck_service.h" | |
26 #include "chrome/browser/sync/glue/autofill_data_type_controller.h" | 24 #include "chrome/browser/sync/glue/autofill_data_type_controller.h" |
27 #include "chrome/browser/sync/glue/autofill_profile_data_type_controller.h" | 25 #include "chrome/browser/sync/glue/autofill_profile_data_type_controller.h" |
28 #include "chrome/browser/sync/glue/bookmark_change_processor.h" | 26 #include "chrome/browser/sync/glue/bookmark_change_processor.h" |
29 #include "chrome/browser/sync/glue/bookmark_data_type_controller.h" | 27 #include "chrome/browser/sync/glue/bookmark_data_type_controller.h" |
30 #include "chrome/browser/sync/glue/bookmark_model_associator.h" | 28 #include "chrome/browser/sync/glue/bookmark_model_associator.h" |
31 #include "chrome/browser/sync/glue/data_type_manager_impl.h" | 29 #include "chrome/browser/sync/glue/data_type_manager_impl.h" |
32 #include "chrome/browser/sync/glue/data_type_manager_observer.h" | 30 #include "chrome/browser/sync/glue/data_type_manager_observer.h" |
33 #include "chrome/browser/sync/glue/extension_data_type_controller.h" | 31 #include "chrome/browser/sync/glue/extension_data_type_controller.h" |
34 #include "chrome/browser/sync/glue/extension_setting_data_type_controller.h" | 32 #include "chrome/browser/sync/glue/extension_setting_data_type_controller.h" |
35 #include "chrome/browser/sync/glue/generic_change_processor.h" | 33 #include "chrome/browser/sync/glue/generic_change_processor.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 #include "chrome/browser/policy/managed_mode_policy_provider.h" | 67 #include "chrome/browser/policy/managed_mode_policy_provider.h" |
70 #include "chrome/browser/policy/profile_policy_connector.h" | 68 #include "chrome/browser/policy/profile_policy_connector.h" |
71 #include "chrome/browser/policy/profile_policy_connector_factory.h" | 69 #include "chrome/browser/policy/profile_policy_connector_factory.h" |
72 #endif | 70 #endif |
73 | 71 |
74 #if !defined(OS_ANDROID) | 72 #if !defined(OS_ANDROID) |
75 #include "chrome/browser/notifications/sync_notifier/chrome_notifier_service.h" | 73 #include "chrome/browser/notifications/sync_notifier/chrome_notifier_service.h" |
76 #include "chrome/browser/notifications/sync_notifier/chrome_notifier_service_fac
tory.h" | 74 #include "chrome/browser/notifications/sync_notifier/chrome_notifier_service_fac
tory.h" |
77 #endif | 75 #endif |
78 | 76 |
| 77 #if defined(ENABLE_SPELLCHECK) |
| 78 #include "chrome/browser/spellchecker/spellcheck_factory.h" |
| 79 #include "chrome/browser/spellchecker/spellcheck_service.h" |
| 80 #endif |
| 81 |
79 using browser_sync::AutofillDataTypeController; | 82 using browser_sync::AutofillDataTypeController; |
80 using browser_sync::AutofillProfileDataTypeController; | 83 using browser_sync::AutofillProfileDataTypeController; |
81 using browser_sync::BookmarkChangeProcessor; | 84 using browser_sync::BookmarkChangeProcessor; |
82 using browser_sync::BookmarkDataTypeController; | 85 using browser_sync::BookmarkDataTypeController; |
83 using browser_sync::BookmarkModelAssociator; | 86 using browser_sync::BookmarkModelAssociator; |
84 using browser_sync::DataTypeController; | 87 using browser_sync::DataTypeController; |
85 using browser_sync::DataTypeErrorHandler; | 88 using browser_sync::DataTypeErrorHandler; |
86 using browser_sync::DataTypeManager; | 89 using browser_sync::DataTypeManager; |
87 using browser_sync::DataTypeManagerImpl; | 90 using browser_sync::DataTypeManagerImpl; |
88 using browser_sync::DataTypeManagerObserver; | 91 using browser_sync::DataTypeManagerObserver; |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 } | 375 } |
373 #if !defined(OS_ANDROID) | 376 #if !defined(OS_ANDROID) |
374 case syncer::SYNCED_NOTIFICATIONS: { | 377 case syncer::SYNCED_NOTIFICATIONS: { |
375 notifier::ChromeNotifierService* notifier_service = | 378 notifier::ChromeNotifierService* notifier_service = |
376 notifier::ChromeNotifierServiceFactory::GetForProfile( | 379 notifier::ChromeNotifierServiceFactory::GetForProfile( |
377 profile_, Profile::EXPLICIT_ACCESS); | 380 profile_, Profile::EXPLICIT_ACCESS); |
378 return notifier_service ? notifier_service->AsWeakPtr() | 381 return notifier_service ? notifier_service->AsWeakPtr() |
379 : base::WeakPtr<syncer::SyncableService>(); | 382 : base::WeakPtr<syncer::SyncableService>(); |
380 } | 383 } |
381 #endif | 384 #endif |
| 385 #if defined(ENABLE_SPELLCHECK) |
382 case syncer::DICTIONARY: | 386 case syncer::DICTIONARY: |
383 return SpellcheckServiceFactory::GetForProfile(profile_)-> | 387 return SpellcheckServiceFactory::GetForProfile(profile_)-> |
384 GetCustomDictionary()->AsWeakPtr(); | 388 GetCustomDictionary()->AsWeakPtr(); |
| 389 #endif |
385 case syncer::FAVICON_IMAGES: | 390 case syncer::FAVICON_IMAGES: |
386 case syncer::FAVICON_TRACKING: { | 391 case syncer::FAVICON_TRACKING: { |
387 browser_sync::SessionModelAssociator* model_associator = | 392 browser_sync::SessionModelAssociator* model_associator = |
388 ProfileSyncServiceFactory::GetForProfile(profile_)-> | 393 ProfileSyncServiceFactory::GetForProfile(profile_)-> |
389 GetSessionModelAssociator(); | 394 GetSessionModelAssociator(); |
390 if (!model_associator) | 395 if (!model_associator) |
391 return base::WeakPtr<syncer::SyncableService>(); | 396 return base::WeakPtr<syncer::SyncableService>(); |
392 return model_associator->GetFaviconCache()->AsWeakPtr(); | 397 return model_associator->GetFaviconCache()->AsWeakPtr(); |
393 } | 398 } |
394 #if defined(ENABLE_MANAGED_USERS) | 399 #if defined(ENABLE_MANAGED_USERS) |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 ProfileSyncComponentsFactory::SyncComponents | 477 ProfileSyncComponentsFactory::SyncComponents |
473 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( | 478 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( |
474 ProfileSyncService* profile_sync_service, | 479 ProfileSyncService* profile_sync_service, |
475 DataTypeErrorHandler* error_handler) { | 480 DataTypeErrorHandler* error_handler) { |
476 SessionModelAssociator* model_associator = | 481 SessionModelAssociator* model_associator = |
477 new SessionModelAssociator(profile_sync_service, error_handler); | 482 new SessionModelAssociator(profile_sync_service, error_handler); |
478 SessionChangeProcessor* change_processor = | 483 SessionChangeProcessor* change_processor = |
479 new SessionChangeProcessor(error_handler, model_associator); | 484 new SessionChangeProcessor(error_handler, model_associator); |
480 return SyncComponents(model_associator, change_processor); | 485 return SyncComponents(model_associator, change_processor); |
481 } | 486 } |
OLD | NEW |