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

Unified Diff: content/child/simple_webmimeregistry_impl.cc

Issue 471913002: Added a method to detect all supported "image/*" MIME types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a test for SimpleWebMimeRegistryImpl. Created 6 years, 4 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 | « content/child/simple_webmimeregistry_impl.h ('k') | content/child/simple_webmimeregistry_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..fda30d3794b720e6c6c8cb26e1e747f5caee2407 100644
--- a/content/child/simple_webmimeregistry_impl.cc
+++ b/content/child/simple_webmimeregistry_impl.cc
@@ -35,6 +35,16 @@ WebMimeRegistry::SupportsType SimpleWebMimeRegistryImpl::supportsImageMIMEType(
}
WebMimeRegistry::SupportsType
+ SimpleWebMimeRegistryImpl::supportsImagePrefixedMIMEType(
+ const WebString& mime_type) {
+ std::string ascii_mime_type = ToASCIIOrEmpty(mime_type);
+ return (net::IsSupportedImageMimeType(ascii_mime_type)
+ || (ascii_mime_type.substr(0, 6) == "image/"
jam 2014/08/25 18:01:15 nit: put the '||' in the previous line also use S
+ && net::IsSupportedNonImageMimeType(ascii_mime_type))) ?
jam 2014/08/25 18:01:15 && in previous line
+ WebMimeRegistry::IsSupported : WebMimeRegistry::IsNotSupported;
+}
+
+WebMimeRegistry::SupportsType
SimpleWebMimeRegistryImpl::supportsJavaScriptMIMEType(
const WebString& mime_type) {
return net::IsSupportedJavascriptMimeType(ToASCIIOrEmpty(mime_type)) ?
« no previous file with comments | « content/child/simple_webmimeregistry_impl.h ('k') | content/child/simple_webmimeregistry_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698