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

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

Issue 381613005: [Autofill] Autofill fails to fill credit card number when split across fields. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporated review inputs. Created 6 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: components/autofill/core/browser/name_field.cc
diff --git a/components/autofill/core/browser/name_field.cc b/components/autofill/core/browser/name_field.cc
index 87b77ddb2ffc70a11121a0c546e3f9f1589d6a2d..686545f6f1b609993c3a1d2c766ba69f0c82e310 100644
--- a/components/autofill/core/browser/name_field.cc
+++ b/components/autofill/core/browser/name_field.cc
@@ -28,9 +28,9 @@ class FullNameField : public NameField {
virtual bool ClassifyField(ServerFieldTypeMap* map) const OVERRIDE;
private:
- explicit FullNameField(const AutofillField* field);
+ explicit FullNameField(AutofillField* field);
- const AutofillField* field_;
+ AutofillField* field_;
DISALLOW_COPY_AND_ASSIGN(FullNameField);
};
@@ -49,9 +49,9 @@ class FirstLastNameField : public NameField {
private:
FirstLastNameField();
- const AutofillField* first_name_;
- const AutofillField* middle_name_; // Optional.
- const AutofillField* last_name_;
+ AutofillField* first_name_;
+ AutofillField* middle_name_; // Optional.
+ AutofillField* last_name_;
bool middle_initial_; // True if middle_name_ is a middle initial.
DISALLOW_COPY_AND_ASSIGN(FirstLastNameField);
@@ -87,7 +87,7 @@ FullNameField* FullNameField::Parse(AutofillScanner* scanner) {
// Searching for any label containing the word "name" is too general;
// for example, Travelocity_Edit travel profile.html contains a field
// "Travel Profile Name".
- const AutofillField* field = NULL;
+ AutofillField* field = NULL;
if (ParseField(scanner, UTF8ToUTF16(autofill::kNameRe), &field))
return new FullNameField(field);
@@ -98,8 +98,7 @@ bool FullNameField::ClassifyField(ServerFieldTypeMap* map) const {
return AddClassification(field_, NAME_FULL, map);
}
-FullNameField::FullNameField(const AutofillField* field)
- : field_(field) {
+FullNameField::FullNameField(AutofillField* field) : field_(field) {
}
FirstLastNameField* FirstLastNameField::ParseSpecificName(
@@ -109,7 +108,7 @@ FirstLastNameField* FirstLastNameField::ParseSpecificName(
scoped_ptr<FirstLastNameField> v(new FirstLastNameField);
scanner->SaveCursor();
- const AutofillField* next = NULL;
+ AutofillField* next = NULL;
if (ParseField(scanner,
UTF8ToUTF16(autofill::kNameSpecificRe), &v->first_name_) &&
ParseEmptyLabel(scanner, &next)) {
« no previous file with comments | « components/autofill/core/browser/form_field.cc ('k') | components/autofill/core/browser/name_field_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698