Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Side by Side Diff: chrome/browser/sync/profile_sync_components_factory_impl.cc

Issue 23868013: Refactor dependency on Profile to BrowserContext in spell check. (Closed) Base URL: http://src.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 case syncer::SYNCED_NOTIFICATIONS: { 371 case syncer::SYNCED_NOTIFICATIONS: {
372 notifier::ChromeNotifierService* notifier_service = 372 notifier::ChromeNotifierService* notifier_service =
373 notifier::ChromeNotifierServiceFactory::GetForProfile( 373 notifier::ChromeNotifierServiceFactory::GetForProfile(
374 profile_, Profile::EXPLICIT_ACCESS); 374 profile_, Profile::EXPLICIT_ACCESS);
375 return notifier_service ? notifier_service->AsWeakPtr() 375 return notifier_service ? notifier_service->AsWeakPtr()
376 : base::WeakPtr<syncer::SyncableService>(); 376 : base::WeakPtr<syncer::SyncableService>();
377 } 377 }
378 #endif 378 #endif
379 #if defined(ENABLE_SPELLCHECK) 379 #if defined(ENABLE_SPELLCHECK)
380 case syncer::DICTIONARY: 380 case syncer::DICTIONARY:
381 return SpellcheckServiceFactory::GetForProfile(profile_)-> 381 return SpellcheckServiceFactory::GetForContext(profile_)->
382 GetCustomDictionary()->AsWeakPtr(); 382 GetCustomDictionary()->AsWeakPtr();
383 #endif 383 #endif
384 case syncer::FAVICON_IMAGES: 384 case syncer::FAVICON_IMAGES:
385 case syncer::FAVICON_TRACKING: { 385 case syncer::FAVICON_TRACKING: {
386 browser_sync::SessionModelAssociator* model_associator = 386 browser_sync::SessionModelAssociator* model_associator =
387 ProfileSyncServiceFactory::GetForProfile(profile_)-> 387 ProfileSyncServiceFactory::GetForProfile(profile_)->
388 GetSessionModelAssociator(); 388 GetSessionModelAssociator();
389 if (!model_associator) 389 if (!model_associator)
390 return base::WeakPtr<syncer::SyncableService>(); 390 return base::WeakPtr<syncer::SyncableService>();
391 return model_associator->GetFaviconCache()->AsWeakPtr(); 391 return model_associator->GetFaviconCache()->AsWeakPtr();
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 ProfileSyncComponentsFactory::SyncComponents 471 ProfileSyncComponentsFactory::SyncComponents
472 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( 472 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents(
473 ProfileSyncService* profile_sync_service, 473 ProfileSyncService* profile_sync_service,
474 DataTypeErrorHandler* error_handler) { 474 DataTypeErrorHandler* error_handler) {
475 SessionModelAssociator* model_associator = 475 SessionModelAssociator* model_associator =
476 new SessionModelAssociator(profile_sync_service, error_handler); 476 new SessionModelAssociator(profile_sync_service, error_handler);
477 SessionChangeProcessor* change_processor = 477 SessionChangeProcessor* change_processor =
478 new SessionChangeProcessor(error_handler, model_associator); 478 new SessionChangeProcessor(error_handler, model_associator);
479 return SyncComponents(model_associator, change_processor); 479 return SyncComponents(model_associator, change_processor);
480 } 480 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698