| 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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 case syncer::SYNCED_NOTIFICATIONS: { | 370 case syncer::SYNCED_NOTIFICATIONS: { |
| 371 notifier::ChromeNotifierService* notifier_service = | 371 notifier::ChromeNotifierService* notifier_service = |
| 372 notifier::ChromeNotifierServiceFactory::GetForProfile( | 372 notifier::ChromeNotifierServiceFactory::GetForProfile( |
| 373 profile_, Profile::EXPLICIT_ACCESS); | 373 profile_, Profile::EXPLICIT_ACCESS); |
| 374 return notifier_service ? notifier_service->AsWeakPtr() | 374 return notifier_service ? notifier_service->AsWeakPtr() |
| 375 : base::WeakPtr<syncer::SyncableService>(); | 375 : base::WeakPtr<syncer::SyncableService>(); |
| 376 } | 376 } |
| 377 #endif | 377 #endif |
| 378 #if defined(ENABLE_SPELLCHECK) | 378 #if defined(ENABLE_SPELLCHECK) |
| 379 case syncer::DICTIONARY: | 379 case syncer::DICTIONARY: |
| 380 return SpellcheckServiceFactory::GetForProfile(profile_)-> | 380 return SpellcheckServiceFactory::GetForContext(profile_)-> |
| 381 GetCustomDictionary()->AsWeakPtr(); | 381 GetCustomDictionary()->AsWeakPtr(); |
| 382 #endif | 382 #endif |
| 383 case syncer::FAVICON_IMAGES: | 383 case syncer::FAVICON_IMAGES: |
| 384 case syncer::FAVICON_TRACKING: { | 384 case syncer::FAVICON_TRACKING: { |
| 385 browser_sync::SessionModelAssociator* model_associator = | 385 browser_sync::SessionModelAssociator* model_associator = |
| 386 ProfileSyncServiceFactory::GetForProfile(profile_)-> | 386 ProfileSyncServiceFactory::GetForProfile(profile_)-> |
| 387 GetSessionModelAssociator(); | 387 GetSessionModelAssociator(); |
| 388 if (!model_associator) | 388 if (!model_associator) |
| 389 return base::WeakPtr<syncer::SyncableService>(); | 389 return base::WeakPtr<syncer::SyncableService>(); |
| 390 return model_associator->GetFaviconCache()->AsWeakPtr(); | 390 return model_associator->GetFaviconCache()->AsWeakPtr(); |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 ProfileSyncComponentsFactory::SyncComponents | 470 ProfileSyncComponentsFactory::SyncComponents |
| 471 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( | 471 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( |
| 472 ProfileSyncService* profile_sync_service, | 472 ProfileSyncService* profile_sync_service, |
| 473 DataTypeErrorHandler* error_handler) { | 473 DataTypeErrorHandler* error_handler) { |
| 474 SessionModelAssociator* model_associator = | 474 SessionModelAssociator* model_associator = |
| 475 new SessionModelAssociator(profile_sync_service, error_handler); | 475 new SessionModelAssociator(profile_sync_service, error_handler); |
| 476 SessionChangeProcessor* change_processor = | 476 SessionChangeProcessor* change_processor = |
| 477 new SessionChangeProcessor(error_handler, model_associator); | 477 new SessionChangeProcessor(error_handler, model_associator); |
| 478 return SyncComponents(model_associator, change_processor); | 478 return SyncComponents(model_associator, change_processor); |
| 479 } | 479 } |
| OLD | NEW |