| Index: chrome/browser/password_manager/test_password_store.cc
|
| diff --git a/chrome/browser/password_manager/test_password_store.cc b/chrome/browser/password_manager/test_password_store.cc
|
| index 492363446cf412ae14fa008ebc1b24d715e0980c..c6cbe8b13cf8aed088d374339e704c69f766cee7 100644
|
| --- a/chrome/browser/password_manager/test_password_store.cc
|
| +++ b/chrome/browser/password_manager/test_password_store.cc
|
| @@ -4,7 +4,7 @@
|
|
|
| #include "chrome/browser/password_manager/test_password_store.h"
|
|
|
| -#include "content/public/common/password_form.h"
|
| +#include "components/autofill/core/common/password_form.h"
|
|
|
| // static
|
| scoped_refptr<RefcountedBrowserContextKeyedService> TestPasswordStore::Create(
|
| @@ -23,8 +23,8 @@ void TestPasswordStore::Clear() {
|
| stored_passwords_.clear();
|
| }
|
|
|
| -bool TestPasswordStore::FormsAreEquivalent(const content::PasswordForm& lhs,
|
| - const content::PasswordForm& rhs) {
|
| +bool TestPasswordStore::FormsAreEquivalent(const autofill::PasswordForm& lhs,
|
| + const autofill::PasswordForm& rhs) {
|
| return lhs.origin == rhs.origin &&
|
| lhs.username_element == rhs.username_element &&
|
| lhs.username_value == rhs.username_value &&
|
| @@ -41,14 +41,14 @@ void TestPasswordStore::WrapModificationTask(base::Closure task) {
|
| task.Run();
|
| }
|
|
|
| -void TestPasswordStore::AddLoginImpl(const content::PasswordForm& form) {
|
| +void TestPasswordStore::AddLoginImpl(const autofill::PasswordForm& form) {
|
| stored_passwords_[form.signon_realm].push_back(form);
|
| }
|
|
|
| -void TestPasswordStore::UpdateLoginImpl(const content::PasswordForm& form) {
|
| - std::vector<content::PasswordForm>& forms =
|
| +void TestPasswordStore::UpdateLoginImpl(const autofill::PasswordForm& form) {
|
| + std::vector<autofill::PasswordForm>& forms =
|
| stored_passwords_[form.signon_realm];
|
| - for (std::vector<content::PasswordForm>::iterator it = forms.begin();
|
| + for (std::vector<autofill::PasswordForm>::iterator it = forms.begin();
|
| it != forms.end(); ++it) {
|
| if (FormsAreEquivalent(form, *it)) {
|
| *it = form;
|
| @@ -56,10 +56,10 @@ void TestPasswordStore::UpdateLoginImpl(const content::PasswordForm& form) {
|
| }
|
| }
|
|
|
| -void TestPasswordStore::RemoveLoginImpl(const content::PasswordForm& form) {
|
| - std::vector<content::PasswordForm>& forms =
|
| +void TestPasswordStore::RemoveLoginImpl(const autofill::PasswordForm& form) {
|
| + std::vector<autofill::PasswordForm>& forms =
|
| stored_passwords_[form.signon_realm];
|
| - for (std::vector<content::PasswordForm>::iterator it = forms.begin();
|
| + for (std::vector<autofill::PasswordForm>::iterator it = forms.begin();
|
| it != forms.end(); ++it) {
|
| if (FormsAreEquivalent(form, *it)) {
|
| forms.erase(it);
|
| @@ -69,24 +69,24 @@ void TestPasswordStore::RemoveLoginImpl(const content::PasswordForm& form) {
|
| }
|
|
|
| void TestPasswordStore::GetLoginsImpl(
|
| - const content::PasswordForm& form,
|
| + const autofill::PasswordForm& form,
|
| const PasswordStore::ConsumerCallbackRunner& runner) {
|
| - std::vector<content::PasswordForm*> matched_forms;
|
| - std::vector<content::PasswordForm> forms =
|
| + std::vector<autofill::PasswordForm*> matched_forms;
|
| + std::vector<autofill::PasswordForm> forms =
|
| stored_passwords_[form.signon_realm];
|
| - for (std::vector<content::PasswordForm>::iterator it = forms.begin();
|
| + for (std::vector<autofill::PasswordForm>::iterator it = forms.begin();
|
| it != forms.end(); ++it) {
|
| - matched_forms.push_back(new content::PasswordForm(*it));
|
| + matched_forms.push_back(new autofill::PasswordForm(*it));
|
| }
|
| runner.Run(matched_forms);
|
| }
|
|
|
| bool TestPasswordStore::FillAutofillableLogins(
|
| - std::vector<content::PasswordForm*>* forms) {
|
| + std::vector<autofill::PasswordForm*>* forms) {
|
| return true;
|
| }
|
|
|
| bool TestPasswordStore::FillBlacklistLogins(
|
| - std::vector<content::PasswordForm*>* forms) {
|
| + std::vector<autofill::PasswordForm*>* forms) {
|
| return true;
|
| }
|
|
|