summaryrefslogtreecommitdiffstats
path: root/base/i18n
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-13 16:48:41 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-13 16:50:48 +0000
commitdf80704e21578c439a2facfdaeabfe016d297353 (patch)
tree01092783052df5d2b027b80ec67011b5475e5c19 /base/i18n
parent5a25b4d1b753851cab3d5100d32bbc87ca4a4e4d (diff)
downloadchromium_src-df80704e21578c439a2facfdaeabfe016d297353.zip
chromium_src-df80704e21578c439a2facfdaeabfe016d297353.tar.gz
chromium_src-df80704e21578c439a2facfdaeabfe016d297353.tar.bz2
Revert 289312 "Move StringToUpperASCII and LowerCaseEqualsASCII ..."
> Move StringToUpperASCII and LowerCaseEqualsASCII to the base namespace > > Convert LowerCaseEqualsASCII to take StringPiece. In the current patch this is > generally a NOP but will allow me to delete the other 4 variants in a followup > (wanted to do that separately since that will require more review, since > callsites will be changed in nontrivial ways). > > In some cases, LowerCaseEqualsASCII is called with a WebString, which no > longer is implicitly converted. I added base::string16(...) around such > calls to force the right conversion. It happened in these files: > window_container_type.cc > savable_resources.cc > render_view_impl.cc > blink_ax_tree_source.cc > password_form_conversion_utils.cc > translate_helper.cc > chrome_render_view_observer.cc > dom_serializer_browsertest.cc > > R=jamesr@chromium.org > > Review URL: https://codereview.chromium.org/448143008 TBR=brettw@chromium.org Review URL: https://codereview.chromium.org/474483002 Cr-Commit-Position: refs/heads/master@{#289320} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289320 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/i18n')
-rw-r--r--base/i18n/rtl.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/base/i18n/rtl.cc b/base/i18n/rtl.cc
index 30737d64..392cb13 100644
--- a/base/i18n/rtl.cc
+++ b/base/i18n/rtl.cc
@@ -84,17 +84,17 @@ std::string ICULocaleName(const std::string& locale_string) {
if (locale_string.substr(0, 2) != "es")
return locale_string;
// Expand es to es-ES.
- if (base::LowerCaseEqualsASCII(locale_string, "es"))
+ if (LowerCaseEqualsASCII(locale_string, "es"))
return "es-ES";
// Map es-419 (Latin American Spanish) to es-FOO depending on the system
// locale. If it's es-RR other than es-ES, map to es-RR. Otherwise, map
// to es-MX (the most populous in Spanish-speaking Latin America).
- if (base::LowerCaseEqualsASCII(locale_string, "es-419")) {
+ if (LowerCaseEqualsASCII(locale_string, "es-419")) {
const icu::Locale& locale = icu::Locale::getDefault();
std::string language = locale.getLanguage();
const char* country = locale.getCountry();
- if (base::LowerCaseEqualsASCII(language, "es") &&
- !base::LowerCaseEqualsASCII(country, "es")) {
+ if (LowerCaseEqualsASCII(language, "es") &&
+ !LowerCaseEqualsASCII(country, "es")) {
language += '-';
language += country;
return language;