diff options
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | net/base/net_util.cc | 9 | ||||
-rw-r--r-- | net/base/net_util_unittest.cc | 4 |
3 files changed, 10 insertions, 4 deletions
@@ -10,3 +10,4 @@ Jesse Miller <jesse@jmiller.biz> Szymon Piechowicz <szymonpiechowicz@o2.pl> James Vega <vega.james@gmail.com> Marco Rodrigues <gothicx@gmail.com> +Matthias Reitinger <reimarvin@gmail.com> diff --git a/net/base/net_util.cc b/net/base/net_util.cc index 2064af7..d3075ad 100644 --- a/net/base/net_util.cc +++ b/net/base/net_util.cc @@ -541,7 +541,13 @@ bool IsIDNComponentSafe(const char16* str, status = U_ZERO_ERROR; // TODO(jungshik) Cache exemplar sets for locales. ULocaleData* uld = ulocdata_open(lang.c_str(), &status); - if (U_SUCCESS(status)) { + // TODO(jungshik) Turn this check on when the ICU data file is + // rebuilt with the minimal subset of locale data for languages + // to which Chrome is not localized but which we offer in the list + // of languages selectable for Accept-Languages. With the rebuilt ICU + // data, ulocdata_open never should fall back to the default locale. (issue 2078) + // DCHECK(U_SUCCESS(status) && status != U_USING_DEFAULT_WARNING); + if (U_SUCCESS(status) && status != U_USING_DEFAULT_WARNING) { // Should we use auxiliary set, instead? ulocdata_getExemplarSet(uld, lang_set, 0, ULOCDATA_ES_STANDARD, &status); ulocdata_close(uld); @@ -908,4 +914,3 @@ bool IsPortAllowedByFtp(int port) { } } // namespace net - diff --git a/net/base/net_util_unittest.cc b/net/base/net_util_unittest.cc index 954afad..22fb7d4 100644 --- a/net/base/net_util_unittest.cc +++ b/net/base/net_util_unittest.cc @@ -38,7 +38,7 @@ struct FileNameCDCase { const wchar_t* kLanguages[] = { L"", L"en", L"zh-CN", L"ja", L"ko", L"he", L"ar", L"ru", L"el", L"fr", - L"de", L"pt", L"se", L"th", L"hi", + L"de", L"pt", L"sv", L"th", L"hi", L"de,en", L"el,en", L"zh,zh-TW,en", L"ko,ja", L"he,ru,en", L"zh,ru,en" }; @@ -395,7 +395,7 @@ TEST(NetUtilTest, IDNToUnicode) { {"www.xn--frgbolaget-q5a.se", L"www.f\x00e4rgbolaget.se", {true, false, false, false, false, false, false, false, false, false, - true, false, false, false, false, + true, false, true, false, false, true, false, false, false, false, false}}, // c-cedilla (French) |