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

Unified Diff: components/mime_util/mime_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
Index: components/mime_util/mime_util.cc
diff --git a/components/mime_util/mime_util.cc b/components/mime_util/mime_util.cc
index 5e5d004d5bee588a71aa9167f2a065b89d8fffbe..3841fbbb69074cbadb8e513fb6b2334e06cf5b85 100644
--- a/components/mime_util/mime_util.cc
+++ b/components/mime_util/mime_util.cc
@@ -161,9 +161,10 @@ bool MimeUtil::IsSupportedNonImageMimeType(const std::string& mime_type) const {
#if !defined(OS_IOS)
media::IsSupportedMediaMimeType(mime_type) ||
#endif
- (StartsWithASCII(mime_type, "text/", false /* case insensitive */) &&
+ (base::StartsWithASCII(mime_type, "text/",
+ false /* case insensitive */) &&
!IsUnsupportedTextMimeType(mime_type)) ||
- (StartsWithASCII(mime_type, "application/", false) &&
+ (base::StartsWithASCII(mime_type, "application/", false) &&
net::MatchesMimeType("application/*+json", mime_type));
}
@@ -178,7 +179,7 @@ bool MimeUtil::IsSupportedJavascriptMimeType(
}
bool MimeUtil::IsSupportedMimeType(const std::string& mime_type) const {
- return (StartsWithASCII(mime_type, "image/", false) &&
+ return (base::StartsWithASCII(mime_type, "image/", false) &&
IsSupportedImageMimeType(mime_type)) ||
IsSupportedNonImageMimeType(mime_type);
}
« no previous file with comments | « components/invalidation/gcm_network_channel_unittest.cc ('k') | components/nacl/renderer/ppb_nacl_private_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698