summaryrefslogtreecommitdiffstats
path: root/net/base/mime_util.h
diff options
context:
space:
mode:
authormichaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-21 00:57:45 +0000
committermichaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-21 00:57:45 +0000
commitf7359a1a9592d2f6230e08b255f528707656373f (patch)
treebda87076ebc198dd8c66f363d788190f93f48b14 /net/base/mime_util.h
parente7352bb3ea7b53e06c36cd856d2db4bc6bba5573 (diff)
downloadchromium_src-f7359a1a9592d2f6230e08b255f528707656373f.zip
chromium_src-f7359a1a9592d2f6230e08b255f528707656373f.tar.gz
chromium_src-f7359a1a9592d2f6230e08b255f528707656373f.tar.bz2
Add GetWellKnowMimeTypeFromExtension() to limit the search to a fixed set of well-known types without consulting the OS/registry.
BUG=86108 TESTS=none Review URL: http://codereview.chromium.org/7204036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89773 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/mime_util.h')
-rw-r--r--net/base/mime_util.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/base/mime_util.h b/net/base/mime_util.h
index d228b58..545abe0 100644
--- a/net/base/mime_util.h
+++ b/net/base/mime_util.h
@@ -19,6 +19,13 @@ namespace net {
NET_API bool GetMimeTypeFromExtension(const FilePath::StringType& ext,
std::string* mime_type);
+// Get the mime type (if any) that is associated with the given file extension.
+// Returns true if a corresponding mime type exists. In this method,
+// the search for a mime type is constrained to a limited set of
+// types known to the net library, the OS/registry is not consulted.
+NET_API bool GetWellKnownMimeTypeFromExtension(const FilePath::StringType& ext,
+ std::string* mime_type);
+
// Get the mime type (if any) that is associated with the given file. Returns
// true if a corresponding mime type exists.
NET_API bool GetMimeTypeFromFile(const FilePath& file_path,