Add a CefGetMimeType function for retrieving the mime type of a file extension (issue #1098).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1577 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2014-01-28 17:26:59 +00:00
parent 0c8b381a46
commit 2f8b024797
6 changed files with 119 additions and 49 deletions

View File

@@ -4,6 +4,7 @@
#include <sstream>
#include "include/cef_url.h"
#include "net/base/mime_util.h"
#include "url/gurl.h"
bool CefParseURL(const CefString& url,
@@ -66,3 +67,9 @@ bool CefCreateURL(const CefURLParts& parts,
return false;
}
CefString CefGetMimeType(const CefString& extension) {
std::string mime_type;
net::GetMimeTypeFromExtension(extension, &mime_type);
return mime_type;
}