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

Unified Diff: trunk/src/chrome/browser/ui/autofill/data_model_wrapper.cc

Issue 387123004: Revert 282726 "Reland "Use upstream libaddressinput in Chrome."" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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: trunk/src/chrome/browser/ui/autofill/data_model_wrapper.cc
===================================================================
--- trunk/src/chrome/browser/ui/autofill/data_model_wrapper.cc (revision 282731)
+++ trunk/src/chrome/browser/ui/autofill/data_model_wrapper.cc (working copy)
@@ -22,9 +22,8 @@
#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/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 "third_party/libaddressinput/chromium/cpp/include/libaddressinput/address_data.h"
+#include "third_party/libaddressinput/chromium/cpp/include/libaddressinput/address_formatter.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/image/image.h"
@@ -64,10 +63,6 @@
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));
@@ -76,9 +71,12 @@
non_address_info += base::ASCIIToUTF16("\n") + phone;
- *vertically_compact = base::UTF8ToUTF16(single_line) + non_address_info;
- *horizontally_compact = base::UTF8ToUTF16(JoinString(lines, "\n")) +
- non_address_info;
+ 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;
return true;
}

Powered by Google App Engine
This is Rietveld 408576698