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

Unified Diff: content/child/simple_webmimeregistry_impl.cc

Issue 401523002: Move media related mimetype functionality out of net/ and into media/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and add content/common/mime_util.h for realz Created 6 years, 5 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: content/child/simple_webmimeregistry_impl.cc
diff --git a/content/child/simple_webmimeregistry_impl.cc b/content/child/simple_webmimeregistry_impl.cc
index e7416d92041d5443c2cd4782704a549fa4fbb99e..050ef3dee772da3a9298d89523df01dc5d0b9840 100644
--- a/content/child/simple_webmimeregistry_impl.cc
+++ b/content/child/simple_webmimeregistry_impl.cc
@@ -8,6 +8,8 @@
#include "base/strings/string_util.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
+#include "content/common/mime_util.h"
+#include "media/base/mime_util.h"
#include "net/base/mime_util.h"
#include "third_party/WebKit/public/platform/WebString.h"
@@ -24,7 +26,7 @@ std::string SimpleWebMimeRegistryImpl::ToASCIIOrEmpty(const WebString& string) {
WebMimeRegistry::SupportsType SimpleWebMimeRegistryImpl::supportsMIMEType(
const WebString& mime_type) {
- return net::IsSupportedMimeType(ToASCIIOrEmpty(mime_type)) ?
+ return content::IsSupportedMimeType(ToASCIIOrEmpty(mime_type)) ?
WebMimeRegistry::IsSupported : WebMimeRegistry::IsNotSupported;
}
@@ -69,7 +71,8 @@ bool SimpleWebMimeRegistryImpl::supportsEncryptedMediaMIMEType(
WebMimeRegistry::SupportsType
SimpleWebMimeRegistryImpl::supportsNonImageMIMEType(
const WebString& mime_type) {
- return net::IsSupportedNonImageMimeType(ToASCIIOrEmpty(mime_type)) ?
+ return (net::IsSupportedNonImageMimeType(ToASCIIOrEmpty(mime_type)) ||
+ media::IsSupportedMediaMimeType(ToASCIIOrEmpty(mime_type))) ?
WebMimeRegistry::IsSupported : WebMimeRegistry::IsNotSupported;
}

Powered by Google App Engine
This is Rietveld 408576698