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

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

Issue 504273003: Remove implicit conversions from scoped_refptr to T* in chrome/browser/sync/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Propagate Created 6 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/bookmarks/bookmark_model_factory.h" 7 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
8 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h" 8 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h"
9 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" 9 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h"
10 #include "chrome/browser/history/history_service.h" 10 #include "chrome/browser/history/history_service.h"
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 if (service) 524 if (service)
525 return service->GetSyncableService()->AsWeakPtr(); 525 return service->GetSyncableService()->AsWeakPtr();
526 return base::WeakPtr<syncer::SyncableService>(); 526 return base::WeakPtr<syncer::SyncableService>();
527 } 527 }
528 case syncer::SESSIONS: { 528 case syncer::SESSIONS: {
529 return ProfileSyncServiceFactory::GetForProfile(profile_)-> 529 return ProfileSyncServiceFactory::GetForProfile(profile_)->
530 GetSessionsSyncableService()->AsWeakPtr(); 530 GetSessionsSyncableService()->AsWeakPtr();
531 } 531 }
532 case syncer::PASSWORDS: { 532 case syncer::PASSWORDS: {
533 #if defined(PASSWORD_MANAGER_ENABLE_SYNC) 533 #if defined(PASSWORD_MANAGER_ENABLE_SYNC)
534 password_manager::PasswordStore* password_store = 534 scoped_refptr<password_manager::PasswordStore> password_store =
535 PasswordStoreFactory::GetForProfile(profile_, 535 PasswordStoreFactory::GetForProfile(profile_,
536 Profile::EXPLICIT_ACCESS); 536 Profile::EXPLICIT_ACCESS);
537 return password_store ? password_store->GetPasswordSyncableService() 537 return password_store.get() ? password_store->GetPasswordSyncableService()
538 : base::WeakPtr<syncer::SyncableService>(); 538 : base::WeakPtr<syncer::SyncableService>();
539 #else 539 #else
540 return base::WeakPtr<syncer::SyncableService>(); 540 return base::WeakPtr<syncer::SyncableService>();
541 #endif 541 #endif
542 } 542 }
543 default: 543 default:
544 // The following datatypes still need to be transitioned to the 544 // The following datatypes still need to be transitioned to the
545 // syncer::SyncableService API: 545 // syncer::SyncableService API:
546 // Bookmarks 546 // Bookmarks
547 // Typed URLs 547 // Typed URLs
548 NOTREACHED(); 548 NOTREACHED();
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 new TypedUrlModelAssociator(profile_sync_service, 674 new TypedUrlModelAssociator(profile_sync_service,
675 history_backend, 675 history_backend,
676 error_handler); 676 error_handler);
677 TypedUrlChangeProcessor* change_processor = 677 TypedUrlChangeProcessor* change_processor =
678 new TypedUrlChangeProcessor(profile_, 678 new TypedUrlChangeProcessor(profile_,
679 model_associator, 679 model_associator,
680 history_backend, 680 history_backend,
681 error_handler); 681 error_handler);
682 return SyncComponents(model_associator, change_processor); 682 return SyncComponents(model_associator, change_processor);
683 } 683 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host_core.cc ('k') | chrome/browser/sync/profile_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698