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

Unified Diff: components/autofill/content/browser/wallet/wallet_address.cc

Issue 111853012: rAc: support street-address. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 12 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/content/browser/wallet/wallet_address.cc
diff --git a/components/autofill/content/browser/wallet/wallet_address.cc b/components/autofill/content/browser/wallet/wallet_address.cc
index 000b616fdf3ad32fbbe638a0c3005180bb6e55a3..bc22a60b692ec4a9cab4f5473c7aac3da738c399 100644
--- a/components/autofill/content/browser/wallet/wallet_address.cc
+++ b/components/autofill/content/browser/wallet/wallet_address.cc
@@ -280,17 +280,19 @@ base::string16 Address::GetInfo(const AutofillType& type,
if (type.html_type() == HTML_TYPE_COUNTRY_CODE) {
DCHECK(IsStringASCII(country_name_code()));
return base::ASCIIToUTF16(country_name_code());
- } else if (type.html_type() == HTML_TYPE_STREET_ADDRESS) {
- base::string16 address = address_line_1();
- if (!address_line_2().empty())
- address += base::ASCIIToUTF16(", ") + address_line_2();
- return address;
}
switch (type.GetStorableType()) {
case NAME_FULL:
return recipient_name();
+ case ADDRESS_HOME_STREET_ADDRESS: {
+ base::string16 address = address_line_1();
+ if (!address_line_2().empty())
+ address += base::ASCIIToUTF16("\n") + address_line_2();
+ return address;
+ }
+
case ADDRESS_HOME_LINE1:
return address_line_1();

Powered by Google App Engine
This is Rietveld 408576698