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

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

Issue 1172183002: Move StartsWith[ASCII] to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util3
Patch Set: merger Created 5 years, 6 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 3cdbe7f435c62fa3e3bc995f5a9576bc645ae447..9556bb9351a9543ea0467b7dd2a539877957a922 100644
--- a/components/translate/core/language_detection/language_detection_util.cc
+++ b/components/translate/core/language_detection/language_detection_util.cc
@@ -197,7 +197,8 @@ bool CanCLDComplementSubCode(
// CLD agree that the language is Chinese and Content-Language doesn't know
// which dialect is used, CLD language has priority.
// TODO(hajimehoshi): How about the other dialects like zh-MO?
- return page_language == "zh" && StartsWithASCII(cld_language, "zh-", false);
+ return page_language == "zh" &&
+ base::StartsWithASCII(cld_language, "zh-", false);
}
} // namespace
@@ -380,7 +381,7 @@ 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 (!StartsWithASCII(page_language, "en", false))
+ if (!base::StartsWithASCII(page_language, "en", false))
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