From bae0ea1f95c5c3a02761d942c0802ec877c1a106 Mon Sep 17 00:00:00 2001 From: "estade@chromium.org" Date: Sat, 14 Feb 2009 01:20:41 +0000 Subject: Change mime type utils to operate on platform-specific string types for filenames/file extensions. Review URL: http://codereview.chromium.org/21327 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9809 0039d316-1c4b-4281-b951-d872f2087c98 --- net/base/mime_util.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'net/base/mime_util.h') diff --git a/net/base/mime_util.h b/net/base/mime_util.h index 7bfe1c3..d442e0f 100644 --- a/net/base/mime_util.h +++ b/net/base/mime_util.h @@ -7,21 +7,24 @@ #include +#include "base/file_path.h" + namespace net { // Get the mime type (if any) that is associated with the given file extension. // Returns true if a corresponding mime type exists. -bool GetMimeTypeFromExtension(const std::wstring& ext, std::string* mime_type); +bool GetMimeTypeFromExtension(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. -bool GetMimeTypeFromFile(const std::wstring& file_path, std::string* mime_type); +bool GetMimeTypeFromFile(const FilePath& file_path, std::string* mime_type); // Get the preferred extension (if any) associated with the given mime type. // Returns true if a corresponding file extension exists. The extension is // returned without a prefixed dot, ex "html". bool GetPreferredExtensionForMimeType(const std::string& mime_type, - std::wstring* extension); + FilePath::StringType* extension); // Check to see if a particular MIME type is in our list. bool IsSupportedImageMimeType(const char* mime_type); -- cgit v1.1