Commit a9be894f authored by dcheng's avatar dcheng Committed by Commit bot

Remove implicit conversions from scoped_refptr to T* in chrome/browser/password_manager/

This patch was generated by running the rewrite_scoped_refptr clang tool
on a Linux build.

BUG=110610

Review URL: https://codereview.chromium.org/505233004

Cr-Commit-Position: refs/heads/master@{#291972}
parent af1f8817
......@@ -11,7 +11,8 @@ KeyedService* MockPasswordStoreService::Build(
content::BrowserContext* /*profile*/) {
scoped_refptr<password_manager::PasswordStore> store(
new password_manager::MockPasswordStore);
if (!store || !store->Init(syncer::SyncableService::StartSyncFlare(), ""))
if (!store.get() ||
!store->Init(syncer::SyncableService::StartSyncFlare(), ""))
return NULL;
return new MockPasswordStoreService(store);
}
......
......@@ -62,7 +62,7 @@ scoped_refptr<PasswordStore> PasswordStoreService::GetPasswordStore() {
}
void PasswordStoreService::Shutdown() {
if (password_store_)
if (password_store_.get())
password_store_->Shutdown();
}
......@@ -229,9 +229,9 @@ KeyedService* PasswordStoreFactory::BuildServiceInstanceFor(
#endif
std::string sync_username =
password_manager_sync_metrics::GetSyncUsername(profile);
if (!ps || !ps->Init(
sync_start_util::GetFlareForSyncableService(profile->GetPath()),
sync_username)) {
if (!ps.get() ||
!ps->Init(sync_start_util::GetFlareForSyncableService(profile->GetPath()),
sync_username)) {
NOTREACHED() << "Could not initialize password manager.";
return NULL;
}
......
......@@ -11,7 +11,8 @@ KeyedService* TestPasswordStoreService::Build(
content::BrowserContext* /*profile*/) {
scoped_refptr<password_manager::PasswordStore> store(
new password_manager::TestPasswordStore);
if (!store || !store->Init(syncer::SyncableService::StartSyncFlare(), ""))
if (!store.get() ||
!store->Init(syncer::SyncableService::StartSyncFlare(), ""))
return NULL;
return new TestPasswordStoreService(store);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment