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

Unified Diff: net/base/mime_util.cc

Issue 1016553003: Remove MIME type check for pre-ICS Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/mime_util.cc
diff --git a/net/base/mime_util.cc b/net/base/mime_util.cc
index e4901277c3f8c12e9207a83deddfeee0fa09ad71..0b42b85920239bded4ff775fa81c2544b8889d36 100644
--- a/net/base/mime_util.cc
+++ b/net/base/mime_util.cc
@@ -342,7 +342,7 @@ static const char* const common_media_types[] = {
"audio/x-wav",
#if defined(OS_ANDROID)
- // HLS. Supported by Android ICS and above.
+ // HLS.
"application/vnd.apple.mpegurl",
"application/x-mpegurl",
#endif
@@ -486,16 +486,6 @@ static bool IsCodecSupportedOnAndroid(MimeUtil::Codec codec) {
return false;
}
-
-static bool IsMimeTypeSupportedOnAndroid(const std::string& mimeType) {
- // HLS codecs are supported in ICS and above (API level 14)
- if ((!mimeType.compare("application/vnd.apple.mpegurl") ||
- !mimeType.compare("application/x-mpegurl")) &&
- base::android::BuildInfo::GetInstance()->sdk_int() < 14) {
- return false;
- }
- return true;
-}
#endif
struct MediaFormatStrict {
@@ -645,10 +635,6 @@ void MimeUtil::InitializeMimeTypeMaps() {
for (size_t i = 0; i < arraysize(supported_javascript_types); ++i)
non_image_map_.insert(supported_javascript_types[i]);
for (size_t i = 0; i < arraysize(common_media_types); ++i) {
-#if defined(OS_ANDROID)
- if (!IsMimeTypeSupportedOnAndroid(common_media_types[i]))
- continue;
-#endif
non_image_map_.insert(common_media_types[i]);
}
#if defined(USE_PROPRIETARY_CODECS)
@@ -660,10 +646,6 @@ void MimeUtil::InitializeMimeTypeMaps() {
// Initialize the supported media types.
for (size_t i = 0; i < arraysize(common_media_types); ++i) {
-#if defined(OS_ANDROID)
- if (!IsMimeTypeSupportedOnAndroid(common_media_types[i]))
- continue;
-#endif
media_map_.insert(common_media_types[i]);
}
#if defined(USE_PROPRIETARY_CODECS)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698