summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
Diffstat (limited to 'base')
-rw-r--r--base/sys_string_conversions_linux.cc15
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