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

Unified Diff: components/autofill/core/browser/address.cc

Issue 347183005: autofill names - dont parse when calling SetRawInfo(FULL_NAME) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android test expectation Created 6 years, 5 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
Index: components/autofill/core/browser/address.cc
diff --git a/components/autofill/core/browser/address.cc b/components/autofill/core/browser/address.cc
index fc2e5a3c6ffc3429eb05d4d6e3e04d0465c3c7ff..4b977bfbe45a63a3379971e0d0cce13470d8256d 100644
--- a/components/autofill/core/browser/address.cc
+++ b/components/autofill/core/browser/address.cc
@@ -172,19 +172,9 @@ bool Address::SetInfo(const AutofillType& type,
return !country_code_.empty();
}
- // If the address doesn't have any newlines, don't attempt to parse it into
- // lines, since this is potentially a user-entered address in the user's own
- // format, so the code would have to rely on iffy heuristics at best.
- // Instead, just give up when importing addresses like this.
- if (storable_type == ADDRESS_HOME_STREET_ADDRESS && !value.empty() &&
- value.find(base::char16('\n')) == base::string16::npos) {
- street_address_.clear();
- return false;
- }
-
SetRawInfo(storable_type, value);
- // Likewise, give up when importing addresses with any entirely blank lines.
+ // Give up when importing addresses with any entirely blank lines.
// There's a good chance that this formatting is not intentional, but it's
// also not obviously safe to just strip the newlines.
if (storable_type == ADDRESS_HOME_STREET_ADDRESS &&
« no previous file with comments | « chrome/browser/ui/webui/options/autofill_options_handler.cc ('k') | components/autofill/core/browser/address_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698