diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-26 23:37:55 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-26 23:37:55 +0000 |
commit | 8d86fce009d9dc39300a5ec9b0559ce17ff0e44e (patch) | |
tree | 74d2f7779a00c20f7ca9ef5e88852b01f4f4619d /webkit/glue/glue_util.cc | |
parent | 5c935c135c544163d9b3923fd9e6d612cedf05c1 (diff) | |
download | chromium_src-8d86fce009d9dc39300a5ec9b0559ce17ff0e44e.zip chromium_src-8d86fce009d9dc39300a5ec9b0559ce17ff0e44e.tar.gz chromium_src-8d86fce009d9dc39300a5ec9b0559ce17ff0e44e.tar.bz2 |
Chrome side to implement WebMimeRegistry.
R=dglazkov
Review URL: http://codereview.chromium.org/27222
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10532 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/glue_util.cc')
-rw-r--r-- | webkit/glue/glue_util.cc | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/webkit/glue/glue_util.cc b/webkit/glue/glue_util.cc index 113d413..359eb40 100644 --- a/webkit/glue/glue_util.cc +++ b/webkit/glue/glue_util.cc @@ -16,8 +16,9 @@ MSVC_PUSH_WARNING_LEVEL(0); #include "KURL.h" MSVC_POP_WARNING(); -#undef LOG +#include "WebString.h" +#undef LOG #include "base/compiler_specific.h" #include "base/gfx/rect.h" #include "base/string_piece.h" @@ -98,6 +99,22 @@ WebCore::String FilePathStringToString(const FilePath::StringType& str) { #endif } +FilePath::StringType WebStringToFilePathString(const WebKit::WebString& str) { +#if defined(OS_POSIX) + return base::SysWideToNativeMB(UTF16ToWide(str)); +#elif defined(OS_WIN) + return UTF16ToWide(str); +#endif +} + +WebKit::WebString FilePathStringToWebString(const FilePath::StringType& str) { +#if defined(OS_POSIX) + return WideToUTF16(base::SysNativeMBToWide(str)); +#elif defined(OS_WIN) + return WideToUTF16(str); +#endif +} + // URL conversions ------------------------------------------------------------- GURL KURLToGURL(const WebCore::KURL& url) { |