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

Unified Diff: components/autofill/browser/address_field.cc

Issue 13888008: Fix for forms with more than three address lines getting partially Autofilled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 8 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
« no previous file with comments | « no previous file | components/autofill/browser/autofill_regex_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/browser/address_field.cc
diff --git a/components/autofill/browser/address_field.cc b/components/autofill/browser/address_field.cc
index 037896d0a4450143e55a8de13b6bac2a7c7960c4..61852a4a651779dc3983dd530b27718fa993dc5d 100644
--- a/components/autofill/browser/address_field.cc
+++ b/components/autofill/browser/address_field.cc
@@ -227,10 +227,11 @@ bool AddressField::ParseAddressLines(AutofillScanner* scanner,
&address_field->address2_);
}
- // Try for a third line, which we will promptly discard.
+ // Try for surplus lines, which we will promptly discard.
if (address_field->address2_ != NULL) {
- pattern = UTF8ToUTF16(autofill::kAddressLine3Re);
- ParseField(scanner, pattern, NULL);
+ do
+ pattern = UTF8ToUTF16(autofill::kAddressLinesExtraRe);
+ while (ParseField(scanner, pattern, NULL));
Ilya Sherman 2013/04/17 05:56:33 nit: Please write this as: pattern = UTF8ToUTF16(
Jim Blackler 2013/04/18 13:49:22 Oh yeah it seems I didn't study that closely what
}
return true;
« no previous file with comments | « no previous file | components/autofill/browser/autofill_regex_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698