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( ...@@ -11,7 +11,8 @@ KeyedService* MockPasswordStoreService::Build(
content::BrowserContext* /*profile*/) { content::BrowserContext* /*profile*/) {
scoped_refptr<password_manager::PasswordStore> store( scoped_refptr<password_manager::PasswordStore> store(
new password_manager::MockPasswordStore); new password_manager::MockPasswordStore);
if (!store || !store->Init(syncer::SyncableService::StartSyncFlare(), "")) if (!store.get() ||
!store->Init(syncer::SyncableService::StartSyncFlare(), ""))
return NULL; return NULL;
return new MockPasswordStoreService(store); return new MockPasswordStoreService(store);
} }
......
...@@ -62,7 +62,7 @@ scoped_refptr<PasswordStore> PasswordStoreService::GetPasswordStore() { ...@@ -62,7 +62,7 @@ scoped_refptr<PasswordStore> PasswordStoreService::GetPasswordStore() {
} }
void PasswordStoreService::Shutdown() { void PasswordStoreService::Shutdown() {
if (password_store_) if (password_store_.get())
password_store_->Shutdown(); password_store_->Shutdown();
} }
...@@ -229,8 +229,8 @@ KeyedService* PasswordStoreFactory::BuildServiceInstanceFor( ...@@ -229,8 +229,8 @@ KeyedService* PasswordStoreFactory::BuildServiceInstanceFor(
#endif #endif
std::string sync_username = std::string sync_username =
password_manager_sync_metrics::GetSyncUsername(profile); password_manager_sync_metrics::GetSyncUsername(profile);
if (!ps || !ps->Init( if (!ps.get() ||
sync_start_util::GetFlareForSyncableService(profile->GetPath()), !ps->Init(sync_start_util::GetFlareForSyncableService(profile->GetPath()),
sync_username)) { sync_username)) {
NOTREACHED() << "Could not initialize password manager."; NOTREACHED() << "Could not initialize password manager.";
return NULL; return NULL;
......
...@@ -11,7 +11,8 @@ KeyedService* TestPasswordStoreService::Build( ...@@ -11,7 +11,8 @@ KeyedService* TestPasswordStoreService::Build(
content::BrowserContext* /*profile*/) { content::BrowserContext* /*profile*/) {
scoped_refptr<password_manager::PasswordStore> store( scoped_refptr<password_manager::PasswordStore> store(
new password_manager::TestPasswordStore); new password_manager::TestPasswordStore);
if (!store || !store->Init(syncer::SyncableService::StartSyncFlare(), "")) if (!store.get() ||
!store->Init(syncer::SyncableService::StartSyncFlare(), ""))
return NULL; return NULL;
return new TestPasswordStoreService(store); 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