diff options
-rw-r--r-- | webkit/glue/chromium_bridge_impl.cc | 12 | ||||
-rw-r--r-- | webkit/port/platform/MIMETypeRegistry.cpp | 10 | ||||
-rw-r--r-- | webkit/port/platform/chromium/ChromiumBridge.h | 3 |
3 files changed, 5 insertions, 20 deletions
diff --git a/webkit/glue/chromium_bridge_impl.cc b/webkit/glue/chromium_bridge_impl.cc index 3c53e28..1115d3d 100644 --- a/webkit/glue/chromium_bridge_impl.cc +++ b/webkit/glue/chromium_bridge_impl.cc @@ -247,18 +247,6 @@ bool ChromiumBridge::layoutTestMode() { // MimeType ------------------------------------------------------------------- -bool isSupportedImageMIMEType(const char* mime_type) { - return net::IsSupportedImageMimeType(mime_type); -} - -bool isSupportedJavascriptMIMEType(const char* mime_type) { - return net::IsSupportedJavascriptMimeType(mime_type); -} - -bool isSupportedNonImageMIMEType(const char* mime_type) { - return net::IsSupportedNonImageMimeType(mime_type); -} - bool ChromiumBridge::matchesMIMEType(const String& pattern, const String& type) { return net::MatchesMimeType(webkit_glue::StringToStdString(pattern), diff --git a/webkit/port/platform/MIMETypeRegistry.cpp b/webkit/port/platform/MIMETypeRegistry.cpp index 670b5c3..7e7d898 100644 --- a/webkit/port/platform/MIMETypeRegistry.cpp +++ b/webkit/port/platform/MIMETypeRegistry.cpp @@ -24,7 +24,6 @@ */ #include "config.h" -#include "ChromiumBridge.h" #include "CString.h" #include "MIMETypeRegistry.h" #include "MediaPlayer.h" @@ -32,6 +31,8 @@ #include <wtf/HashMap.h> #include <wtf/HashSet.h> +#include "net/base/mime_util.h" + namespace WebCore { @@ -73,7 +74,7 @@ String MIMETypeRegistry::getMIMETypeForPath(const String& path) bool MIMETypeRegistry::isSupportedImageMIMEType(const String& mimeType) { return !mimeType.isEmpty() - && ChromiumBridge::isSupportedImageMIMEType(mimeType.latin1().data()); + && net::IsSupportedImageMimeType(mimeType.latin1().data()); } bool MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(const String& mimeType) @@ -84,9 +85,8 @@ bool MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(const String& mimeTyp bool MIMETypeRegistry::isSupportedJavaScriptMIMEType(const String& mimeType) { - const char* data = mimeType.latin1().data(); return !mimeType.isEmpty() - && ChromiumBridge::isSupportedJavascriptMIMEType(data); + && net::IsSupportedJavascriptMimeType(mimeType.latin1().data()); } bool MIMETypeRegistry::isSupportedImageResourceMIMEType(const String& mimeType) @@ -97,7 +97,7 @@ bool MIMETypeRegistry::isSupportedImageResourceMIMEType(const String& mimeType) bool MIMETypeRegistry::isSupportedNonImageMIMEType(const String& mimeType) { return !mimeType.isEmpty() - && ChromiumBridge::isSupportedNonImageMIMEType(mimeType.latin1().data()); + && net::IsSupportedNonImageMimeType(mimeType.latin1().data()); } #if ENABLE(VIDEO) diff --git a/webkit/port/platform/chromium/ChromiumBridge.h b/webkit/port/platform/chromium/ChromiumBridge.h index 7c4e1c1..4e4e5b1 100644 --- a/webkit/port/platform/chromium/ChromiumBridge.h +++ b/webkit/port/platform/chromium/ChromiumBridge.h @@ -96,9 +96,6 @@ namespace WebCore { static bool layoutTestMode(); // MimeType ----------------------------------------------------------- - static bool isSupportedImageMIMEType(const char* mime_type); - static bool isSupportedJavascriptMIMEType(const char* mime_type); - static bool isSupportedNonImageMIMEType(const char* mime_type); static bool matchesMIMEType(const String& pattern, const String& type); static String mimeTypeForExtension(const String& ext); static String mimeTypeFromFile(const String& file_path); |