Index: chrome/browser/ui/autofill/data_model_wrapper.cc |
diff --git a/chrome/browser/ui/autofill/data_model_wrapper.cc b/chrome/browser/ui/autofill/data_model_wrapper.cc |
index 92b5fc10db97bb9c9ea2384ae476b824523c0828..de9b8b7201a8f114f773bba3ecf566c6bc740446 100644 |
--- a/chrome/browser/ui/autofill/data_model_wrapper.cc |
+++ b/chrome/browser/ui/autofill/data_model_wrapper.cc |
@@ -22,8 +22,9 @@ |
#include "components/autofill/core/browser/autofill_type.h" |
#include "components/autofill/core/browser/credit_card.h" |
#include "components/autofill/core/browser/form_structure.h" |
-#include "third_party/libaddressinput/chromium/cpp/include/libaddressinput/address_data.h" |
-#include "third_party/libaddressinput/chromium/cpp/include/libaddressinput/address_formatter.h" |
+#include "third_party/libaddressinput/src/cpp/include/libaddressinput/address_data.h" |
+#include "third_party/libaddressinput/src/cpp/include/libaddressinput/address_field.h" |
+#include "third_party/libaddressinput/src/cpp/include/libaddressinput/address_formatter.h" |
#include "ui/base/resource/resource_bundle.h" |
#include "ui/gfx/image/image.h" |
@@ -63,6 +64,10 @@ bool DataModelWrapper::GetDisplayText( |
std::vector<std::string> lines; |
::i18n::addressinput::GetFormattedNationalAddress(*address_data, &lines); |
+ std::string single_line; |
+ ::i18n::addressinput::GetFormattedNationalAddressLine( |
+ *address_data, &single_line); |
+ |
// Email and phone number aren't part of address formatting. |
base::string16 non_address_info; |
base::string16 email = GetInfoForDisplay(AutofillType(EMAIL_ADDRESS)); |
@@ -71,12 +76,9 @@ bool DataModelWrapper::GetDisplayText( |
non_address_info += base::ASCIIToUTF16("\n") + phone; |
- std::string line_address; |
- ::i18n::addressinput::GetFormattedNationalAddressLine(*address_data, |
- &line_address); |
- *vertically_compact = base::UTF8ToUTF16(line_address) + non_address_info; |
- *horizontally_compact = |
- base::UTF8ToUTF16(JoinString(lines, "\n")) + non_address_info; |
+ *vertically_compact = base::UTF8ToUTF16(single_line) + non_address_info; |
+ *horizontally_compact = base::UTF8ToUTF16(JoinString(lines, "\n")) + |
+ non_address_info; |
return true; |
} |