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

Unified Diff: Source/WebCore/platform/chromium/MIMETypeRegistryChromium.cpp

Issue 7356002: Merge 90308 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/782/
Patch Set: Created 9 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
« no previous file with comments | « Source/WebCore/platform/MIMETypeRegistry.cpp ('k') | Source/WebCore/platform/chromium/PlatformBridge.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/platform/chromium/MIMETypeRegistryChromium.cpp
===================================================================
--- Source/WebCore/platform/chromium/MIMETypeRegistryChromium.cpp (revision 90866)
+++ Source/WebCore/platform/chromium/MIMETypeRegistryChromium.cpp (working copy)
@@ -36,27 +36,24 @@
#include "PluginDataChromium.h"
#include <wtf/text/CString.h>
-// NOTE: Unlike other ports, we don't use the shared implementation bits in
-// MIMETypeRegistry.cpp. Instead, we need to route most functions via the
-// PlatformBridge to the embedder.
+// NOTE: Unlike other ports, we don't use the shared implementation in
+// MIMETypeRegistry.cpp. Instead, we need to route most functions via
+// the PlatformBridge to the embedder.
namespace WebCore {
-#if ENABLE(FILE_SYSTEM) && ENABLE(WORKERS)
-String MIMETypeRegistry::getMIMETypeForExtensionThreadSafe(const String &ext)
+String MIMETypeRegistry::getMIMETypeForExtension(const String &ext)
{
return PlatformBridge::mimeTypeForExtension(ext);
}
-#endif
-// NOTE: We have to define getMIMETypeForExtension() here though the shared
-// implementation has getMIMETypeForExtension() since we don't use the shared
-// implementation bits in MIMETypeRegistry.cpp.
-
-String MIMETypeRegistry::getMIMETypeForExtension(const String &ext)
+#if ENABLE(FILE_SYSTEM)
+String MIMETypeRegistry::getWellKnownMIMETypeForExtension(const String &ext)
{
- return PlatformBridge::mimeTypeForExtension(ext);
+ // This method must be thread safe and should not consult the OS/registry.
+ return PlatformBridge::wellKnownMimeTypeForExtension(ext);
}
+#endif
// Returns the file extension if one is found. Does not include the dot in the
// filename. E.g., 'html'.
« no previous file with comments | « Source/WebCore/platform/MIMETypeRegistry.cpp ('k') | Source/WebCore/platform/chromium/PlatformBridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698