| 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" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 #include "chrome/browser/webdata/autocomplete_syncable_service.h" | 55 #include "chrome/browser/webdata/autocomplete_syncable_service.h" |
| 56 #include "chrome/browser/webdata/autofill_profile_syncable_service.h" | 56 #include "chrome/browser/webdata/autofill_profile_syncable_service.h" |
| 57 #include "chrome/common/chrome_switches.h" | 57 #include "chrome/common/chrome_switches.h" |
| 58 #include "chrome/common/pref_names.h" | 58 #include "chrome/common/pref_names.h" |
| 59 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" | 59 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" |
| 60 #include "content/public/browser/browser_thread.h" | 60 #include "content/public/browser/browser_thread.h" |
| 61 #include "sync/api/syncable_service.h" | 61 #include "sync/api/syncable_service.h" |
| 62 | 62 |
| 63 #if defined(ENABLE_MANAGED_USERS) | 63 #if defined(ENABLE_MANAGED_USERS) |
| 64 #include "chrome/browser/managed_mode/managed_user_service.h" | 64 #include "chrome/browser/managed_mode/managed_user_service.h" |
| 65 #include "chrome/browser/managed_mode/managed_user_settings_service.h" |
| 66 #include "chrome/browser/managed_mode/managed_user_settings_service_factory.h" |
| 65 #include "chrome/browser/managed_mode/managed_user_sync_service.h" | 67 #include "chrome/browser/managed_mode/managed_user_sync_service.h" |
| 66 #include "chrome/browser/managed_mode/managed_user_sync_service_factory.h" | 68 #include "chrome/browser/managed_mode/managed_user_sync_service_factory.h" |
| 67 #include "chrome/browser/policy/managed_mode_policy_provider.h" | |
| 68 #include "chrome/browser/policy/profile_policy_connector.h" | |
| 69 #include "chrome/browser/policy/profile_policy_connector_factory.h" | |
| 70 #endif | 69 #endif |
| 71 | 70 |
| 72 #if !defined(OS_ANDROID) | 71 #if !defined(OS_ANDROID) |
| 73 #include "chrome/browser/notifications/sync_notifier/chrome_notifier_service.h" | 72 #include "chrome/browser/notifications/sync_notifier/chrome_notifier_service.h" |
| 74 #include "chrome/browser/notifications/sync_notifier/chrome_notifier_service_fac
tory.h" | 73 #include "chrome/browser/notifications/sync_notifier/chrome_notifier_service_fac
tory.h" |
| 75 #endif | 74 #endif |
| 76 | 75 |
| 77 #if defined(ENABLE_SPELLCHECK) | 76 #if defined(ENABLE_SPELLCHECK) |
| 78 #include "chrome/browser/spellchecker/spellcheck_factory.h" | 77 #include "chrome/browser/spellchecker/spellcheck_factory.h" |
| 79 #include "chrome/browser/spellchecker/spellcheck_service.h" | 78 #include "chrome/browser/spellchecker/spellcheck_service.h" |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 case syncer::FAVICON_TRACKING: { | 384 case syncer::FAVICON_TRACKING: { |
| 386 browser_sync::SessionModelAssociator* model_associator = | 385 browser_sync::SessionModelAssociator* model_associator = |
| 387 ProfileSyncServiceFactory::GetForProfile(profile_)-> | 386 ProfileSyncServiceFactory::GetForProfile(profile_)-> |
| 388 GetSessionModelAssociator(); | 387 GetSessionModelAssociator(); |
| 389 if (!model_associator) | 388 if (!model_associator) |
| 390 return base::WeakPtr<syncer::SyncableService>(); | 389 return base::WeakPtr<syncer::SyncableService>(); |
| 391 return model_associator->GetFaviconCache()->AsWeakPtr(); | 390 return model_associator->GetFaviconCache()->AsWeakPtr(); |
| 392 } | 391 } |
| 393 #if defined(ENABLE_MANAGED_USERS) | 392 #if defined(ENABLE_MANAGED_USERS) |
| 394 case syncer::MANAGED_USER_SETTINGS: | 393 case syncer::MANAGED_USER_SETTINGS: |
| 395 return policy::ProfilePolicyConnectorFactory::GetForProfile(profile_)-> | 394 return ManagedUserSettingsServiceFactory::GetForProfile(profile_)-> |
| 396 managed_mode_policy_provider()->AsWeakPtr(); | 395 AsWeakPtr(); |
| 397 case syncer::MANAGED_USERS: | 396 case syncer::MANAGED_USERS: |
| 398 return ManagedUserSyncServiceFactory::GetForProfile(profile_)-> | 397 return ManagedUserSyncServiceFactory::GetForProfile(profile_)-> |
| 399 AsWeakPtr(); | 398 AsWeakPtr(); |
| 400 #endif | 399 #endif |
| 401 default: | 400 default: |
| 402 // The following datatypes still need to be transitioned to the | 401 // The following datatypes still need to be transitioned to the |
| 403 // syncer::SyncableService API: | 402 // syncer::SyncableService API: |
| 404 // Bookmarks | 403 // Bookmarks |
| 405 // Passwords | 404 // Passwords |
| 406 // Sessions | 405 // Sessions |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 ProfileSyncComponentsFactory::SyncComponents | 470 ProfileSyncComponentsFactory::SyncComponents |
| 472 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( | 471 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( |
| 473 ProfileSyncService* profile_sync_service, | 472 ProfileSyncService* profile_sync_service, |
| 474 DataTypeErrorHandler* error_handler) { | 473 DataTypeErrorHandler* error_handler) { |
| 475 SessionModelAssociator* model_associator = | 474 SessionModelAssociator* model_associator = |
| 476 new SessionModelAssociator(profile_sync_service, error_handler); | 475 new SessionModelAssociator(profile_sync_service, error_handler); |
| 477 SessionChangeProcessor* change_processor = | 476 SessionChangeProcessor* change_processor = |
| 478 new SessionChangeProcessor(error_handler, model_associator); | 477 new SessionChangeProcessor(error_handler, model_associator); |
| 479 return SyncComponents(model_associator, change_processor); | 478 return SyncComponents(model_associator, change_processor); |
| 480 } | 479 } |
| OLD | NEW |