From 82e8b87d750b6872054133275e37cac8cfddd591 Mon Sep 17 00:00:00 2001 From: "darin@chromium.org" Date: Thu, 26 Feb 2009 20:40:00 +0000 Subject: [PATCH] 2009-02-26 Darin Fisher Reviewed by Eric Seidel. Minor cleanup of ChromiumBridge: Removing unused matchesMIMEType method and s/Javascript/JavaScript/ * platform/chromium/ChromiumBridge.h: * platform/chromium/MimeTypeRegistryChromium.cpp: (WebCore::MIMETypeRegistry::isSupportedImageMIMEType): (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType): (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType): git-svn-id: https://svn.webkit.org/repository/webkit/trunk@41268 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- WebCore/ChangeLog | 13 +++++++++++++ WebCore/platform/chromium/ChromiumBridge.h | 9 ++++----- .../platform/chromium/MimeTypeRegistryChromium.cpp | 9 +++------ 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog index 3ab583aeffe0..e21b67793431 100644 --- a/WebCore/ChangeLog +++ b/WebCore/ChangeLog @@ -1,3 +1,16 @@ +2009-02-26 Darin Fisher + + Reviewed by Eric Seidel. + + Minor cleanup of ChromiumBridge: + Removing unused matchesMIMEType method and s/Javascript/JavaScript/ + + * platform/chromium/ChromiumBridge.h: + * platform/chromium/MimeTypeRegistryChromium.cpp: + (WebCore::MIMETypeRegistry::isSupportedImageMIMEType): + (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType): + (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType): + 2009-02-26 David Hyatt Reviewed by Sam Weinig diff --git a/WebCore/platform/chromium/ChromiumBridge.h b/WebCore/platform/chromium/ChromiumBridge.h index dd36c1ac40a1..e0e965719b5c 100644 --- a/WebCore/platform/chromium/ChromiumBridge.h +++ b/WebCore/platform/chromium/ChromiumBridge.h @@ -100,11 +100,10 @@ namespace WebCore { static bool layoutTestMode(); // MimeType ----------------------------------------------------------- - static bool isSupportedImageMIMEType(const char* mimeType); - static bool isSupportedJavascriptMIMEType(const char* mimeType); - static bool isSupportedNonImageMIMEType(const char* mimeType); - static bool matchesMIMEType(const String& pattern, const String& type); - static String mimeTypeForExtension(const String& ext); + static bool isSupportedImageMIMEType(const String& mimeType); + static bool isSupportedJavaScriptMIMEType(const String& mimeType); + static bool isSupportedNonImageMIMEType(const String& mimeType); + static String mimeTypeForExtension(const String& fileExtension); static String mimeTypeFromFile(const String& filePath); static String preferredExtensionForMIMEType(const String& mimeType); diff --git a/WebCore/platform/chromium/MimeTypeRegistryChromium.cpp b/WebCore/platform/chromium/MimeTypeRegistryChromium.cpp index 5d6f426ef2d2..1aac5ec9e9af 100644 --- a/WebCore/platform/chromium/MimeTypeRegistryChromium.cpp +++ b/WebCore/platform/chromium/MimeTypeRegistryChromium.cpp @@ -83,8 +83,7 @@ String MIMETypeRegistry::getMIMETypeForPath(const String& path) bool MIMETypeRegistry::isSupportedImageMIMEType(const String& mimeType) { - return !mimeType.isEmpty() - && ChromiumBridge::isSupportedImageMIMEType(mimeType.latin1().data()); + return ChromiumBridge::isSupportedImageMIMEType(mimeType); } bool MIMETypeRegistry::isSupportedImageResourceMIMEType(const String& mimeType) @@ -100,14 +99,12 @@ bool MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(const String& mimeTyp bool MIMETypeRegistry::isSupportedJavaScriptMIMEType(const String& mimeType) { - return !mimeType.isEmpty() - && ChromiumBridge::isSupportedJavascriptMIMEType(mimeType.latin1().data()); + return ChromiumBridge::isSupportedJavaScriptMIMEType(mimeType); } bool MIMETypeRegistry::isSupportedNonImageMIMEType(const String& mimeType) { - return !mimeType.isEmpty() - && ChromiumBridge::isSupportedNonImageMIMEType(mimeType.latin1().data()); + return ChromiumBridge::isSupportedNonImageMIMEType(mimeType); } bool MIMETypeRegistry::isSupportedMediaMIMEType(const String& mimeType) -- 2.36.0