summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-01 18:28:58 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-01 18:28:58 +0000
commit1fa7b48bbeb65db6a8865ccb0f432c6cb44fd39c (patch)
tree200ce5aba779cd617ca610645775901afbaf70ed /chrome/browser/autofill
parent2cc800b06bfbdc34b49e25c059ac1da34d63eb61 (diff)
downloadchromium_src-1fa7b48bbeb65db6a8865ccb0f432c6cb44fd39c.zip
chromium_src-1fa7b48bbeb65db6a8865ccb0f432c6cb44fd39c.tar.gz
chromium_src-1fa7b48bbeb65db6a8865ccb0f432c6cb44fd39c.tar.bz2
AutoFill: Don't send select option values to the browser on page load. Only
send the values when the browser instructs the renderer to send form data for a specific form to be auto-filled. BUG=49992 TEST=FormManagerTest.* Review URL: http://codereview.chromium.org/3588004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61202 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill')
-rw-r--r--chrome/browser/autofill/autofill_manager.cc25
-rw-r--r--chrome/browser/autofill/autofill_manager.h7
2 files changed, 0 insertions, 32 deletions
diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc
index 6df9593..3bc138d 100644
--- a/chrome/browser/autofill/autofill_manager.cc
+++ b/chrome/browser/autofill/autofill_manager.cc
@@ -731,31 +731,6 @@ void AutoFillManager::FillFormField(const AutoFillProfile* profile,
}
}
-void AutoFillManager::FillSelectOneField(const AutoFillProfile* profile,
- AutoFillType type,
- webkit_glue::FormField* field) {
- DCHECK(profile);
- DCHECK(field);
- DCHECK(field->form_control_type() == ASCIIToUTF16("select-one"));
- string16 selected_string = profile->GetFieldText(type);
- std::string ascii_value = UTF16ToASCII(selected_string);
- for (size_t i = 0; i < field->option_strings().size(); ++i) {
- if (profile->GetFieldText(type) == field->option_strings()[i]) {
- // An exact match - use it.
- selected_string = profile->GetFieldText(type);
- break;
- }
- if (!base::strcasecmp(UTF16ToASCII(field->option_strings()[i]).c_str(),
- ascii_value.c_str())) {
- // A match, but not in the same case - save it for the case we won't
- // find an exact match.
- selected_string = field->option_strings()[i];
- }
- }
- field->set_value(selected_string);
-}
-
-
void AutoFillManager::FillPhoneNumberField(const AutoFillProfile* profile,
webkit_glue::FormField* field) {
// If we are filling a phone number, check to see if the size field
diff --git a/chrome/browser/autofill/autofill_manager.h b/chrome/browser/autofill/autofill_manager.h
index 0faf475..d46e19e 100644
--- a/chrome/browser/autofill/autofill_manager.h
+++ b/chrome/browser/autofill/autofill_manager.h
@@ -155,13 +155,6 @@ class AutoFillManager : public RenderViewHostDelegate::AutoFill,
AutoFillType type,
webkit_glue::FormField* field);
- // Select matching data in the |field|. For now only fixes the cases of the
- // wrong case, in the future should do extended matching (for example,
- // Hawaii -> HI).
- void FillSelectOneField(const AutoFillProfile* profile,
- AutoFillType type,
- webkit_glue::FormField* field);
-
// Set |field| argument's value for phone number based on contents of the
// |profile|.
void FillPhoneNumberField(const AutoFillProfile* profile,