summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill/form_field.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/autofill/form_field.cc')
-rw-r--r--chrome/browser/autofill/form_field.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/chrome/browser/autofill/form_field.cc b/chrome/browser/autofill/form_field.cc
index 1eba436..24b45ed 100644
--- a/chrome/browser/autofill/form_field.cc
+++ b/chrome/browser/autofill/form_field.cc
@@ -67,6 +67,12 @@ namespace {
// The name of the hidden form control element.
const char* const kControlTypeHidden = "hidden";
+// The name of the radio form control element.
+const char* const kControlTypeRadio = "radio";
+
+// The name of the checkbox form control element.
+const char* const kControlTypeCheckBox = "checkbox";
+
} // namespace
class EmailField : public FormField {
@@ -271,9 +277,13 @@ FormFieldSet::FormFieldSet(FormStructure* fields) {
// Parse fields.
std::vector<AutoFillField*>::const_iterator field = fields->begin();
while (field != fields->end() && *field != NULL) {
- // Don't parse hidden fields.
+ // Don't parse hidden fields or radio or checkbox controls.
if (LowerCaseEqualsASCII((*field)->form_control_type(),
- kControlTypeHidden)) {
+ kControlTypeHidden) ||
+ LowerCaseEqualsASCII((*field)->form_control_type(),
+ kControlTypeRadio) ||
+ LowerCaseEqualsASCII((*field)->form_control_type(),
+ kControlTypeCheckBox)) {
field++;
continue;
}