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

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

Issue 5137004: Autofill: Prefer maxLength to size attribute for form filling heuristics. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Denitting Created 10 years, 1 month 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 | « no previous file | chrome/browser/autofill/autofill_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_manager.cc
diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc
index 50b31a00093497e638cafc4eb108acaab9b62248..6e0db6b791d43b84d118a6327f54647456d539f3 100644
--- a/chrome/browser/autofill/autofill_manager.cc
+++ b/chrome/browser/autofill/autofill_manager.cc
@@ -605,12 +605,12 @@ void AutoFillManager::FillPhoneNumberField(const AutoFillProfile* profile,
bool has_valid_suffix_and_prefix = (number.length() ==
(kAutoFillPhoneNumberPrefixCount + kAutoFillPhoneNumberSuffixCount));
if (has_valid_suffix_and_prefix &&
- field->size() == kAutoFillPhoneNumberPrefixCount) {
+ field->max_length() == kAutoFillPhoneNumberPrefixCount) {
number = number.substr(kAutoFillPhoneNumberPrefixOffset,
kAutoFillPhoneNumberPrefixCount);
field->set_value(number);
} else if (has_valid_suffix_and_prefix &&
- field->size() == kAutoFillPhoneNumberSuffixCount) {
+ field->max_length() == kAutoFillPhoneNumberSuffixCount) {
number = number.substr(kAutoFillPhoneNumberSuffixOffset,
kAutoFillPhoneNumberSuffixCount);
field->set_value(number);
« no previous file with comments | « no previous file | chrome/browser/autofill/autofill_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698