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

Unified Diff: components/translate/core/language_detection/language_detection_util.cc

Issue 1242023005: Remove legacy StartsWithASCII function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: y Created 5 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
« no previous file with comments | « components/translate/core/browser/translate_prefs.cc ('k') | components/url_fixer/url_fixer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/translate/core/language_detection/language_detection_util.cc
diff --git a/components/translate/core/language_detection/language_detection_util.cc b/components/translate/core/language_detection/language_detection_util.cc
index 144071422ce254bed984b521a896dd2123a0ebc8..fe2befed54378157bbf16c5fa383023463ce70fe 100644
--- a/components/translate/core/language_detection/language_detection_util.cc
+++ b/components/translate/core/language_detection/language_detection_util.cc
@@ -198,7 +198,8 @@ bool CanCLDComplementSubCode(
// which dialect is used, CLD language has priority.
// TODO(hajimehoshi): How about the other dialects like zh-MO?
return page_language == "zh" &&
- base::StartsWithASCII(cld_language, "zh-", false);
+ base::StartsWith(cld_language, "zh-",
+ base::CompareCase::INSENSITIVE_ASCII);
}
} // namespace
@@ -381,7 +382,8 @@ bool IsSameOrSimilarLanguages(const std::string& page_language,
bool MaybeServerWrongConfiguration(const std::string& page_language,
const std::string& cld_language) {
// If |page_language| is not "en-*", respect it and just return false here.
- if (!base::StartsWithASCII(page_language, "en", false))
+ if (!base::StartsWith(page_language, "en",
+ base::CompareCase::INSENSITIVE_ASCII))
return false;
// A server provides a language meta information representing "en-*". But it
« no previous file with comments | « components/translate/core/browser/translate_prefs.cc ('k') | components/url_fixer/url_fixer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698