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

Unified Diff: components/mime_util/mime_util.cc

Issue 1129643002: Moved media mime type and codec checks to media/base/mime_util.* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use media/base/mime_util.h in //components/mime_util/DEPS Created 5 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
« no previous file with comments | « components/mime_util/DEPS ('k') | components/mime_util/mime_util.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mime_util/mime_util.cc
diff --git a/components/mime_util/mime_util.cc b/components/mime_util/mime_util.cc
index a017f459bfffeea41a5e3a2d18c598ef8bf0e396..5e5d004d5bee588a71aa9167f2a065b89d8fffbe 100644
--- a/components/mime_util/mime_util.cc
+++ b/components/mime_util/mime_util.cc
@@ -9,6 +9,11 @@
#include "base/strings/string_util.h"
#include "build/build_config.h"
+#if !defined(OS_IOS)
+// iOS doesn't use and must not depend on //media
+#include "media/base/mime_util.h"
+#endif
+
namespace mime_util {
namespace {
@@ -153,11 +158,13 @@ bool MimeUtil::IsSupportedImageMimeType(const std::string& mime_type) const {
bool MimeUtil::IsSupportedNonImageMimeType(const std::string& mime_type) const {
return non_image_types_.find(base::StringToLowerASCII(mime_type)) !=
non_image_types_.end() ||
+#if !defined(OS_IOS)
+ media::IsSupportedMediaMimeType(mime_type) ||
+#endif
(StartsWithASCII(mime_type, "text/", false /* case insensitive */) &&
!IsUnsupportedTextMimeType(mime_type)) ||
(StartsWithASCII(mime_type, "application/", false) &&
- net::MatchesMimeType("application/*+json", mime_type)) ||
- net::IsSupportedMediaMimeType(mime_type);
+ net::MatchesMimeType("application/*+json", mime_type));
}
bool MimeUtil::IsUnsupportedTextMimeType(const std::string& mime_type) const {
« no previous file with comments | « components/mime_util/DEPS ('k') | components/mime_util/mime_util.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698