Commit 6254bbbb authored by dcheng's avatar dcheng Committed by Commit bot

Remove implicit conversions from scoped_refptr to T* in components/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/509553002

Cr-Commit-Position: refs/heads/master@{#291936}
parent dbcee380
...@@ -141,14 +141,14 @@ class PasswordFormManagerTest : public testing::Test { ...@@ -141,14 +141,14 @@ class PasswordFormManagerTest : public testing::Test {
} }
virtual void TearDown() { virtual void TearDown() {
if (mock_store_) if (mock_store_.get())
mock_store_->Shutdown(); mock_store_->Shutdown();
} }
void InitializeMockStore() { void InitializeMockStore() {
if (!mock_store_) { if (!mock_store_.get()) {
mock_store_ = new MockPasswordStore(); mock_store_ = new MockPasswordStore();
ASSERT_TRUE(mock_store_); ASSERT_TRUE(mock_store_.get());
} }
} }
......
...@@ -93,7 +93,7 @@ class PasswordManagerTest : public testing::Test { ...@@ -93,7 +93,7 @@ class PasswordManagerTest : public testing::Test {
true); true);
store_ = new MockPasswordStore; store_ = new MockPasswordStore;
EXPECT_CALL(*store_, ReportMetrics(_)).Times(AnyNumber()); EXPECT_CALL(*store_.get(), ReportMetrics(_)).Times(AnyNumber());
CHECK(store_->Init(syncer::SyncableService::StartSyncFlare(), "")); CHECK(store_->Init(syncer::SyncableService::StartSyncFlare(), ""));
EXPECT_CALL(client_, IsPasswordManagerEnabledForCurrentPage()) EXPECT_CALL(client_, IsPasswordManagerEnabledForCurrentPage())
......
...@@ -311,9 +311,7 @@ class PasswordSyncableServiceWrapper { ...@@ -311,9 +311,7 @@ class PasswordSyncableServiceWrapper {
password_store_->Shutdown(); password_store_->Shutdown();
} }
MockPasswordStore* password_store() { MockPasswordStore* password_store() { return password_store_.get(); }
return password_store_;
}
MockPasswordSyncableService* service() { MockPasswordSyncableService* service() {
return service_.get(); return service_.get();
...@@ -337,10 +335,10 @@ class PasswordSyncableServiceWrapper { ...@@ -337,10 +335,10 @@ class PasswordSyncableServiceWrapper {
void SetPasswordStoreData( void SetPasswordStoreData(
const std::vector<autofill::PasswordForm*>& forms, const std::vector<autofill::PasswordForm*>& forms,
const std::vector<autofill::PasswordForm*>& blacklist_forms) { const std::vector<autofill::PasswordForm*>& blacklist_forms) {
EXPECT_CALL(*password_store_, FillAutofillableLogins(_)) EXPECT_CALL(*password_store_.get(), FillAutofillableLogins(_))
.WillOnce(Invoke(AppendVector(forms))) .WillOnce(Invoke(AppendVector(forms)))
.RetiresOnSaturation(); .RetiresOnSaturation();
EXPECT_CALL(*password_store_, FillBlacklistLogins(_)) EXPECT_CALL(*password_store_.get(), FillBlacklistLogins(_))
.WillOnce(Invoke(AppendVector(blacklist_forms))) .WillOnce(Invoke(AppendVector(blacklist_forms)))
.RetiresOnSaturation(); .RetiresOnSaturation();
} }
......
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