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

Unified Diff: third_party/libaddressinput/chromium/cpp/src/address_validator.cc

Issue 237693002: requestAutocomplete should not unlatinize administrative region names. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 6 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
Index: third_party/libaddressinput/chromium/cpp/src/address_validator.cc
diff --git a/third_party/libaddressinput/chromium/cpp/src/address_validator.cc b/third_party/libaddressinput/chromium/cpp/src/address_validator.cc
index 435f75d935ba15ca452afde02fbc55b25f3de717..28325486e0585c2fb699fc4e70b20f1362f7087f 100644
--- a/third_party/libaddressinput/chromium/cpp/src/address_validator.cc
+++ b/third_party/libaddressinput/chromium/cpp/src/address_validator.cc
@@ -220,7 +220,7 @@ class AddressValidatorImpl : public AddressValidator {
const std::string& user_input = address.GetFieldValue(sub_field_type);
if (!user_input.empty() &&
FilterAllows(filter, sub_field_type, AddressProblem::UNKNOWN_VALUE) &&
- !rule.CanonicalizeSubKey(user_input, &sub_key)) {
+ !rule.CanonicalizeSubKey(user_input, false, &sub_key)) {
problems->push_back(AddressProblem(
sub_field_type,
AddressProblem::UNKNOWN_VALUE,
@@ -443,6 +443,7 @@ class AddressValidatorImpl : public AddressValidator {
ruleset_it->second->GetLanguageCodeRule(address_data->language_code);
return rule.CanonicalizeSubKey(address_data->administrative_area,
+ true, // Keep input latin.
&address_data->administrative_area);
}

Powered by Google App Engine
This is Rietveld 408576698