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

Unified Diff: components/autofill/core/browser/email_field.cc

Issue 853523004: Autofill: Set requirements for number of recognized fields in an autofillable form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More relaxed check for form tag Created 5 years, 11 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: components/autofill/core/browser/email_field.cc
diff --git a/components/autofill/core/browser/email_field.cc b/components/autofill/core/browser/email_field.cc
index cfe4a1a187405a2fc068c42243a87bcb136a75c7..9c67c8892ad91658253ee2ffad7931ca7e9ff4fb 100644
--- a/components/autofill/core/browser/email_field.cc
+++ b/components/autofill/core/browser/email_field.cc
@@ -4,6 +4,7 @@
#include "components/autofill/core/browser/email_field.h"
+#include "base/logging.h"
#include "base/strings/utf_string_conversions.h"
#include "components/autofill/core/browser/autofill_regex_constants.h"
#include "components/autofill/core/browser/autofill_scanner.h"
@@ -22,10 +23,15 @@ scoped_ptr<FormField> EmailField::Parse(AutofillScanner* scanner) {
}
EmailField::EmailField(const AutofillField* field) : field_(field) {
+ DCHECK(field);
}
bool EmailField::ClassifyField(ServerFieldTypeMap* map) const {
return AddClassification(field_, EMAIL_ADDRESS, map);
}
+size_t EmailField::FieldCount() const {
+ return 1;
+}
+
} // namespace autofill

Powered by Google App Engine
This is Rietveld 408576698