Index: chrome/browser/sync/profile_sync_components_factory_impl.cc |
diff --git a/chrome/browser/sync/profile_sync_components_factory_impl.cc b/chrome/browser/sync/profile_sync_components_factory_impl.cc |
index aa16e7eefa68d5ac2780a129d785b2e295fbcf56..400930a97924386aa6f2215307e0d6df33ac0927 100644 |
--- a/chrome/browser/sync/profile_sync_components_factory_impl.cc |
+++ b/chrome/browser/sync/profile_sync_components_factory_impl.cc |
@@ -531,11 +531,11 @@ base::WeakPtr<syncer::SyncableService> ProfileSyncComponentsFactoryImpl:: |
} |
case syncer::PASSWORDS: { |
#if defined(PASSWORD_MANAGER_ENABLE_SYNC) |
- password_manager::PasswordStore* password_store = |
+ scoped_refptr<password_manager::PasswordStore> password_store = |
PasswordStoreFactory::GetForProfile(profile_, |
Profile::EXPLICIT_ACCESS); |
- return password_store ? password_store->GetPasswordSyncableService() |
- : base::WeakPtr<syncer::SyncableService>(); |
+ return password_store.get() ? password_store->GetPasswordSyncableService() |
+ : base::WeakPtr<syncer::SyncableService>(); |
#else |
return base::WeakPtr<syncer::SyncableService>(); |
#endif |