diff options
author | Ben Murdoch <benm@google.com> | 2010-07-29 17:14:53 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2010-08-04 14:29:45 +0100 |
commit | c407dc5cd9bdc5668497f21b26b09d988ab439de (patch) | |
tree | 7eaf8707c0309516bdb042ad976feedaf72b0bb1 /base/sys_string_conversions_linux.cc | |
parent | 0998b1cdac5733f299c12d88bc31ef9c8035b8fa (diff) | |
download | external_chromium-c407dc5cd9bdc5668497f21b26b09d988ab439de.zip external_chromium-c407dc5cd9bdc5668497f21b26b09d988ab439de.tar.gz external_chromium-c407dc5cd9bdc5668497f21b26b09d988ab439de.tar.bz2 |
Merge Chromium src@r53293
Change-Id: Ia79acf8670f385cee48c45b0a75371d8e950af34
Diffstat (limited to 'base/sys_string_conversions_linux.cc')
-rw-r--r-- | base/sys_string_conversions_linux.cc | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/base/sys_string_conversions_linux.cc b/base/sys_string_conversions_linux.cc index 4c4f5ed..6a6eac9 100644 --- a/base/sys_string_conversions_linux.cc +++ b/base/sys_string_conversions_linux.cc @@ -7,7 +7,7 @@ #include <wchar.h> #include "base/string_piece.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" namespace base { @@ -24,6 +24,19 @@ std::wstring SysUTF8ToWide(const StringPiece& utf8) { return out; } +#if defined(OS_CHROMEOS) + +// ChromeOS always runs in UTF-8 locale. +std::string SysWideToNativeMB(const std::wstring& wide) { + return WideToUTF8(wide); +} + +std::wstring SysNativeMBToWide(const StringPiece& native_mb) { + return SysUTF8ToWide(native_mb); +} + +#else + std::string SysWideToNativeMB(const std::wstring& wide) { mbstate_t ps; @@ -141,4 +154,6 @@ std::wstring SysNativeMBToWide(const StringPiece& native_mb) { return out; } +#endif // OS_CHROMEOS + } // namespace base |