summaryrefslogtreecommitdiffstats
path: root/net/base/mime_util.h
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-14 01:20:41 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-14 01:20:41 +0000
commitbae0ea1f95c5c3a02761d942c0802ec877c1a106 (patch)
tree456d3b2eb7cc4fc497870385223c88312db8a914 /net/base/mime_util.h
parent8a5deb2ef0a4cc84b06a3466b32e94375110106c (diff)
downloadchromium_src-bae0ea1f95c5c3a02761d942c0802ec877c1a106.zip
chromium_src-bae0ea1f95c5c3a02761d942c0802ec877c1a106.tar.gz
chromium_src-bae0ea1f95c5c3a02761d942c0802ec877c1a106.tar.bz2
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
Diffstat (limited to 'net/base/mime_util.h')
-rw-r--r--net/base/mime_util.h9
1 files changed, 6 insertions, 3 deletions
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 <string>
+#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);