diff options
author | jshin@chromium.org <jshin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-07 23:23:07 +0000 |
---|---|---|
committer | jshin@chromium.org <jshin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-07 23:23:07 +0000 |
commit | f05c4957883241f49956d594323270db10b72a14 (patch) | |
tree | a1810a4a800eaaebf8e8c5d7e14db70c24006215 /base | |
parent | e8dbc3e7adc70b7b59d86d42e5266a27bbe20ea8 (diff) | |
download | chromium_src-f05c4957883241f49956d594323270db10b72a14.zip chromium_src-f05c4957883241f49956d594323270db10b72a14.tar.gz chromium_src-f05c4957883241f49956d594323270db10b72a14.tar.bz2 |
Make SysNativeMB converters assume UTF-8 on Chrome OS.
Instead of using wcs*mbs and mbs*wcs, just call UTF-8 converters.
BUG=39096
TEST=Covered by existing tests
Review URL: http://codereview.chromium.org/1222002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49118 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/sys_string_conversions_linux.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/base/sys_string_conversions_linux.cc b/base/sys_string_conversions_linux.cc index 26bc78b..6a6eac9 100644 --- a/base/sys_string_conversions_linux.cc +++ b/base/sys_string_conversions_linux.cc @@ -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 |