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

Unified Diff: chrome/browser/autofill/email_field.cc

Issue 7043027: Autofill refactor form_field.h/cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: OVERRIDE glitch. Created 9 years, 7 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
« no previous file with comments | « chrome/browser/autofill/email_field.h ('k') | chrome/browser/autofill/form_field.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/email_field.cc
diff --git a/chrome/browser/autofill/email_field.cc b/chrome/browser/autofill/email_field.cc
index 0f7a6662f3a6f7f16a1ae8d117068f372205c69b..818edb70658cccf89ff87b3b3925e40288ea3f13 100644
--- a/chrome/browser/autofill/email_field.cc
+++ b/chrome/browser/autofill/email_field.cc
@@ -4,10 +4,13 @@
#include "chrome/browser/autofill/email_field.h"
+#include "chrome/browser/autofill/autofill_ecml.h"
#include "chrome/browser/autofill/autofill_scanner.h"
#include "grit/autofill_resources.h"
#include "ui/base/l10n/l10n_util.h"
+using autofill::GetEcmlPattern;
+
// static
EmailField* EmailField::Parse(AutofillScanner* scanner, bool is_ecml) {
string16 pattern;
@@ -17,15 +20,15 @@ EmailField* EmailField::Parse(AutofillScanner* scanner, bool is_ecml) {
pattern = l10n_util::GetStringUTF16(IDS_AUTOFILL_EMAIL_RE);
const AutofillField* field;
- if (ParseText(scanner, pattern, &field))
+ if (ParseField(scanner, pattern, &field))
return new EmailField(field);
return NULL;
}
-bool EmailField::GetFieldInfo(FieldTypeMap* field_type_map) const {
- return Add(field_type_map, field_, EMAIL_ADDRESS);
+EmailField::EmailField(const AutofillField* field) : field_(field) {
}
-EmailField::EmailField(const AutofillField* field) : field_(field) {
+bool EmailField::ClassifyField(FieldTypeMap* map) const {
+ return AddClassification(field_, EMAIL_ADDRESS, map);
}
« no previous file with comments | « chrome/browser/autofill/email_field.h ('k') | chrome/browser/autofill/form_field.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698