Index: components/password_manager/core/browser/test_password_store.cc |
diff --git a/components/password_manager/core/browser/test_password_store.cc b/components/password_manager/core/browser/test_password_store.cc |
index ce361e5a89121bf1f93eab3ee1c1b29b763edb6b..678f7c7520e0faa1a5990e86165ffa3b2afe4c9e 100644 |
--- a/components/password_manager/core/browser/test_password_store.cc |
+++ b/components/password_manager/core/browser/test_password_store.cc |
@@ -98,14 +98,13 @@ void TestPasswordStore::GetLoginsImpl( |
const autofill::PasswordForm& form, |
PasswordStore::AuthorizationPromptPolicy prompt_policy, |
const PasswordStore::ConsumerCallbackRunner& runner) { |
- std::vector<autofill::PasswordForm*> matched_forms; |
+ ScopedVector<autofill::PasswordForm> matched_forms; |
std::vector<autofill::PasswordForm> forms = |
stored_passwords_[form.signon_realm]; |
- for (std::vector<autofill::PasswordForm>::iterator it = forms.begin(); |
- it != forms.end(); ++it) { |
- matched_forms.push_back(new autofill::PasswordForm(*it)); |
+ for (const auto& stored_form : forms) { |
+ matched_forms.push_back(new autofill::PasswordForm(stored_form)); |
} |
- runner.Run(matched_forms); |
+ runner.Run(matched_forms.Pass()); |
} |
PasswordStoreChangeList TestPasswordStore::RemoveLoginsCreatedBetweenImpl( |
@@ -123,12 +122,12 @@ PasswordStoreChangeList TestPasswordStore::RemoveLoginsSyncedBetweenImpl( |
} |
bool TestPasswordStore::FillAutofillableLogins( |
- std::vector<autofill::PasswordForm*>* forms) { |
+ ScopedVector<autofill::PasswordForm>* forms) { |
return true; |
} |
bool TestPasswordStore::FillBlacklistLogins( |
- std::vector<autofill::PasswordForm*>* forms) { |
+ ScopedVector<autofill::PasswordForm>* forms) { |
return true; |
} |