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

Unified Diff: net/base/mime_util.h

Issue 877323009: Extracted media mime type checks from net/base/ into media/base/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build fixes #1 Created 5 years, 10 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 09a3c7e3c7ec4a976eae0340789a76357b801635..d4801673a5f9c2960605aa7f8c3bcc81a6291ad3 100644
--- a/net/base/mime_util.h
+++ b/net/base/mime_util.h
@@ -52,14 +52,16 @@ NET_EXPORT bool GetPreferredExtensionForMimeType(
// Check to see if a particular MIME type is in our list.
NET_EXPORT bool IsSupportedImageMimeType(const std::string& mime_type);
-NET_EXPORT bool IsSupportedMediaMimeType(const std::string& mime_type);
NET_EXPORT bool IsSupportedNonImageMimeType(const std::string& mime_type);
NET_EXPORT bool IsUnsupportedTextMimeType(const std::string& mime_type);
NET_EXPORT bool IsSupportedJavascriptMimeType(const std::string& mime_type);
NET_EXPORT bool IsSupportedCertificateMimeType(const std::string& mime_type);
-// Convenience function.
-NET_EXPORT bool IsSupportedMimeType(const std::string& mime_type);
+// TODO(servolk): This function is deprecated, use content::IsSupportedMimeType
+// instead. This one doesn't include supported media mime types. It will
+// be removed once net::Filter stops using it and the rest of mime_util code
+// is moved to content/public/common/mime_util
+NET_EXPORT bool IsSupportedMimeType_deprecated(const std::string& mime_type);
// Returns true if this the mime_type_pattern matches a given mime-type.
// Checks for absolute matching and wildcards. MIME types are case insensitive.
@@ -89,53 +91,6 @@ NET_EXPORT bool ParseMimeTypeWithoutParameter(const std::string& type_string,
// this method.
NET_EXPORT bool IsValidTopLevelMimeType(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);
-
-// Parses a codec string, populating |codecs_out| with the prefix of each codec
-// in the string |codecs_in|. For example, passed "aaa.b.c,dd.eee", if
-// |strip| == true |codecs_out| will contain {"aaa", "dd"}, if |strip| == false
-// |codecs_out| will contain {"aaa.b.c", "dd.eee"}.
-// See http://www.ietf.org/rfc/rfc4281.txt.
-NET_EXPORT void ParseCodecString(const std::string& codecs,
- std::vector<std::string>* codecs_out,
- bool strip);
-
-// Check to see if a particular MIME type is in our list which only supports a
-// certain subset of codecs.
-NET_EXPORT bool IsStrictMediaMimeType(const std::string& mime_type);
-
-// Indicates that the MIME type and (possible codec string) are supported by the
-// underlying platform.
-enum SupportsType {
- // The underlying platform is known not to support the given MIME type and
- // codec combination.
- IsNotSupported,
-
- // The underlying platform is known to support the given MIME type and codec
- // combination.
- IsSupported,
-
- // The underlying platform is unsure whether the given MIME type and codec
- // combination can be rendered or not before actually trying to play it.
- MayBeSupported
-};
-
-// Checks the |mime_type| and |codecs| against the MIME types known to support
-// only a particular subset of codecs.
-// * Returns IsSupported if the |mime_type| is supported and all the codecs
-// within the |codecs| are supported for the |mime_type|.
-// * Returns MayBeSupported if the |mime_type| is supported and is known to
-// support only a subset of codecs, but |codecs| was empty. Also returned if
-// all the codecs in |codecs| are supported, but additional codec parameters
-// were supplied (such as profile) for which the support cannot be decided.
-// * Returns IsNotSupported if either the |mime_type| is not supported or the
-// |mime_type| is supported but at least one of the codecs within |codecs| is
-// not supported for the |mime_type|.
-NET_EXPORT SupportsType IsSupportedStrictMediaMimeType(
- const std::string& mime_type,
- const std::vector<std::string>& codecs);
-
// Get the extensions associated with the given mime type. There could be
// multiple extensions for a given mime type, like "html,htm" for "text/html",
// or "txt,text,html,..." for "text/*".
@@ -145,12 +100,6 @@ NET_EXPORT void GetExtensionsForMimeType(
const std::string& mime_type,
std::vector<base::FilePath::StringType>* extensions);
-// Test only method that removes proprietary media types and codecs from the
-// list of supported MIME types and codecs. These types and codecs must be
-// removed to ensure consistent layout test results across all Chromium
-// variations.
-NET_EXPORT void RemoveProprietaryMediaTypesAndCodecsForTests();
-
// A list of supported certificate-related mime types.
//
// A Java counterpart will be generated for this enum.

Powered by Google App Engine
This is Rietveld 408576698