Index: chrome/plugin/chrome_plugin_host.cc |
diff --git a/chrome/plugin/chrome_plugin_host.cc b/chrome/plugin/chrome_plugin_host.cc |
index 690bf05f18e6805f6e6c8349b8014220ad89772e..bb9fbee7531059cdb7ff005e5e1b1f2d5e7e68bb 100644 |
--- a/chrome/plugin/chrome_plugin_host.cc |
+++ b/chrome/plugin/chrome_plugin_host.cc |
@@ -436,8 +436,10 @@ int STDCALL CPB_GetBrowsingContextInfo( |
FilePath path = CommandLine::ForCurrentProcess()-> |
GetSwitchValuePath(switches::kPluginDataDir); |
DCHECK(!path.empty()); |
- std::string retval = WideToUTF8( |
- path.Append(chrome::kChromePluginDataDirname).ToWStringHack()); |
+ // TODO(evan): this is wrong. We can't stuff a path through a UTF-8 string. |
+ // But this code is only used by Gears, which will be removed eventually. |
+ std::string retval = UTF16ToUTF8( |
+ path.Append(chrome::kChromePluginDataDirname).LossyDisplayName()); |
*static_cast<char**>(buf) = CPB_StringDup(CPB_Alloc, retval); |
return CPERR_SUCCESS; |