diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/base/l10n/l10n_util.cc | 5 | ||||
-rw-r--r-- | ui/gfx/font_list.cc | 4 | ||||
-rw-r--r-- | ui/gfx/font_list_impl.cc | 3 |
3 files changed, 7 insertions, 5 deletions
diff --git a/ui/base/l10n/l10n_util.cc b/ui/base/l10n/l10n_util.cc index de0e620..010dbde 100644 --- a/ui/base/l10n/l10n_util.cc +++ b/ui/base/l10n/l10n_util.cc @@ -201,8 +201,9 @@ bool IsDuplicateName(const std::string& locale_name) { }; // Skip all the es_Foo other than es_419 for now. - if (base::StartsWithASCII(locale_name, "es_", false)) - return !base::EndsWith(locale_name, "419", true); + if (base::StartsWith(locale_name, "es_", + base::CompareCase::INSENSITIVE_ASCII)) + return !base::EndsWith(locale_name, "419", base::CompareCase::SENSITIVE); for (size_t i = 0; i < arraysize(kDuplicateNames); ++i) { if (base::EqualsCaseInsensitiveASCII(kDuplicateNames[i], locale_name)) diff --git a/ui/gfx/font_list.cc b/ui/gfx/font_list.cc index d0df023..7bdf903 100644 --- a/ui/gfx/font_list.cc +++ b/ui/gfx/font_list.cc @@ -50,7 +50,7 @@ bool FontList::ParseDescription(const std::string& description, // The size takes the form "<INT>px". std::string size_string = styles.back(); styles.pop_back(); - if (!base::EndsWith(size_string, "px", true /* case_sensitive */)) + if (!base::EndsWith(size_string, "px", base::CompareCase::SENSITIVE)) return false; size_string.resize(size_string.size() - 2); if (!base::StringToInt(size_string, size_pixels_out) || @@ -100,7 +100,7 @@ void FontList::SetDefaultFontDescription(const std::string& font_description) { // The description string must end with "px" for size in pixel, or must be // the empty string, which specifies to use a single default font. DCHECK(font_description.empty() || - base::EndsWith(font_description, "px", true)); + base::EndsWith(font_description, "px", base::CompareCase::SENSITIVE)); g_default_font_description.Get() = font_description; g_default_impl_initialized = false; diff --git a/ui/gfx/font_list_impl.cc b/ui/gfx/font_list_impl.cc index 907f4ef..3eb55be 100644 --- a/ui/gfx/font_list_impl.cc +++ b/ui/gfx/font_list_impl.cc @@ -44,7 +44,8 @@ FontListImpl::FontListImpl(const std::string& font_description_string) font_size_(-1) { DCHECK(!font_description_string.empty()); // DCHECK description string ends with "px" for size in pixel. - DCHECK(base::EndsWith(font_description_string, "px", true)); + DCHECK(base::EndsWith(font_description_string, "px", + base::CompareCase::SENSITIVE)); } FontListImpl::FontListImpl(const std::vector<std::string>& font_names, |