summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill/form_structure.cc
diff options
context:
space:
mode:
authorisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-04 08:38:33 +0000
committerisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-04 08:38:33 +0000
commitcdf047a47971aa5695cc730ca52695978a6d87d6 (patch)
treeff56d893c725058e1f84edf1f0cfb554476c8af3 /chrome/browser/autofill/form_structure.cc
parent597386eef934e4d06dd3b15261bf066c06da5485 (diff)
downloadchromium_src-cdf047a47971aa5695cc730ca52695978a6d87d6.zip
chromium_src-cdf047a47971aa5695cc730ca52695978a6d87d6.tar.gz
chromium_src-cdf047a47971aa5695cc730ca52695978a6d87d6.tar.bz2
Only cache <input type="text"> and <select> elements for autofill.
BUG=none TEST=none Review URL: http://codereview.chromium.org/6359019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73783 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill/form_structure.cc')
-rw-r--r--chrome/browser/autofill/form_structure.cc19
1 files changed, 4 insertions, 15 deletions
diff --git a/chrome/browser/autofill/form_structure.cc b/chrome/browser/autofill/form_structure.cc
index 46d8ed3..0805241 100644
--- a/chrome/browser/autofill/form_structure.cc
+++ b/chrome/browser/autofill/form_structure.cc
@@ -38,10 +38,6 @@ const char kXMLElementAutoFillUpload[] = "autofillupload";
const char kXMLElementForm[] = "form";
const char kXMLElementField[] = "field";
-// The list of form control types we handle.
-const char kControlTypeSelect[] = "select-one";
-const char kControlTypeText[] = "text";
-
// The number of fillable fields necessary for a form to be fillable.
const size_t kRequiredFillableFields = 3;
@@ -59,17 +55,10 @@ FormStructure::FormStructure(const FormData& form)
std::vector<webkit_glue::FormField>::const_iterator field;
for (field = form.fields.begin();
field != form.fields.end(); field++) {
- // We currently only handle text and select fields; however, we need to
- // store all fields in order to match the fields stored in the FormManager.
- // We don't append other field types to the form signature though in order
- // to match the form signature of the AutoFill servers.
- if (LowerCaseEqualsASCII(field->form_control_type(), kControlTypeText) ||
- LowerCaseEqualsASCII(field->form_control_type(), kControlTypeSelect)) {
- // Add all supported form fields (including with empty names) to
- // signature. This is a requirement for AutoFill servers.
- form_signature_field_names_.append("&");
- form_signature_field_names_.append(UTF16ToUTF8(field->name()));
- }
+ // Add all supported form fields (including with empty names) to the
+ // signature. This is a requirement for AutoFill servers.
+ form_signature_field_names_.append("&");
+ form_signature_field_names_.append(UTF16ToUTF8(field->name()));
// Generate a unique name for this field by appending a counter to the name.
string16 unique_name = field->name() +