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

Unified Diff: components/autofill/core/common/autofill_data_validation.cc

Issue 614023002: [Password manager] Relplace the FormFieldData vector from autofill::FormData with named fields… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporated nit from Vaclav's review. Created 6 years, 1 month 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: components/autofill/core/common/autofill_data_validation.cc
diff --git a/components/autofill/core/common/autofill_data_validation.cc b/components/autofill/core/common/autofill_data_validation.cc
index c8f6584a430db08e33717e4c7234fe35c7d62bdc..578cc046c99be4b8caf3e4afe8f6279e68822384 100644
--- a/components/autofill/core/common/autofill_data_validation.cc
+++ b/components/autofill/core/common/autofill_data_validation.cc
@@ -59,9 +59,12 @@ bool IsValidFormData(const FormData& form) {
}
bool IsValidPasswordFormFillData(const PasswordFormFillData& form) {
- if (!IsValidFormData(form.basic_data) ||
- !IsValidString(form.preferred_realm))
+ if (!IsValidString16(form.name) || !IsValidGURL(form.origin) ||
+ !IsValidGURL(form.action) || !IsValidFormFieldData(form.username_field) ||
+ !IsValidFormFieldData(form.password_field) ||
+ !IsValidString(form.preferred_realm)) {
return false;
+ }
for (PasswordFormFillData::LoginCollection::const_iterator it =
form.additional_logins.begin();

Powered by Google App Engine
This is Rietveld 408576698