Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1132)

Unified Diff: chrome/browser/password_manager/test_password_store.cc

Issue 23742004: Move PasswordForm from //content to //autofill. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_password_form_conversion_utils
Patch Set: Rebase Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}
« no previous file with comments | « chrome/browser/password_manager/test_password_store.h ('k') | chrome/browser/prerender/prerender_tab_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698