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

Unified Diff: net/base/mime_util.h

Issue 10448109: Move function for classifying a string as a mime type into MimeUtil (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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: net/base/mime_util.h
diff --git a/net/base/mime_util.h b/net/base/mime_util.h
index ba3e25dd389d8ceca03a52b2a723dc1e9ee067c1..f83b3f2bd919a84db8a40e4907535965041baa7a 100644
--- a/net/base/mime_util.h
+++ b/net/base/mime_util.h
@@ -58,6 +58,11 @@ NET_EXPORT bool IsSupportedMimeType(const std::string& mime_type);
NET_EXPORT bool MatchesMimeType(const std::string& mime_type_pattern,
const std::string& mime_type);
+// Returns true if the |type_string| is a correctly-formed mime type specifier.
+// Allows strings of the form x/y[;params], where "x" is a legal mime type name.
+// Also allows wildcard types -- "x/*", "*/*", and "*".
+NET_EXPORT bool IsStringMimeType(const std::string& type_string);
+
// Returns true if and only if all codecs are supported, false otherwise.
NET_EXPORT bool AreSupportedMediaCodecs(const std::vector<std::string>& codecs);

Powered by Google App Engine
This is Rietveld 408576698