Chromium Code Reviews| Index: net/base/mime_util.cc |
| diff --git a/net/base/mime_util.cc b/net/base/mime_util.cc |
| index 67c7242c815b7283ae09d8a65a3713ea9aaa10ff..6863c21f995f22d5c4cc980dac8ea28c5f3c67bd 100644 |
| --- a/net/base/mime_util.cc |
| +++ b/net/base/mime_util.cc |
| @@ -15,6 +15,7 @@ |
| #include "base/logging.h" |
| #include "base/string_util.h" |
| #include "base/strings/string_split.h" |
| +#include "base/strings/sys_string_conversions.h" |
| #include "base/utf_string_conversions.h" |
| using std::string; |
| @@ -221,8 +222,10 @@ bool MimeUtil::GetMimeTypeFromExtensionHelper( |
| #if defined(OS_WIN) |
| string ext_narrow_str = WideToUTF8(ext); |
| -#elif defined(OS_POSIX) |
| +#elif defined(OS_MACOSX) || defined(OS_CHROMEOS) |
| const string& ext_narrow_str = ext; |
| +#else |
| + const string& ext_narrow_str = WideToUTF8(base::SysNativeMBToWide(ext)); |
|
Bernhard Bauer
2013/05/28 21:26:14
Why don't you just use FilePath::AsUTF8Unsafe? The
mrunal
2013/05/28 21:38:47
Because FilePath::AsUTF8Unsafe() is not a static f
Bernhard Bauer
2013/05/28 22:04:00
Right, just construct a new FilePath (which copies
mrunal
2013/05/28 22:41:02
Yeah that will be bit ugly but I get your point no
|
| #endif |
| const char* mime_type; |