summaryrefslogtreecommitdiffstats
path: root/chrome/plugin/chrome_plugin_host.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/plugin/chrome_plugin_host.cc')
-rw-r--r--chrome/plugin/chrome_plugin_host.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/chrome/plugin/chrome_plugin_host.cc b/chrome/plugin/chrome_plugin_host.cc
index ab459f4..4561cc4 100644
--- a/chrome/plugin/chrome_plugin_host.cc
+++ b/chrome/plugin/chrome_plugin_host.cc
@@ -422,11 +422,13 @@ int STDCALL CPB_GetBrowsingContextInfo(
if (buf_size < sizeof(char*))
return sizeof(char*);
- std::wstring wretval = CommandLine::ForCurrentProcess()->
- GetSwitchValue(switches::kPluginDataDir);
- DCHECK(!wretval.empty());
- file_util::AppendToPath(&wretval, chrome::kChromePluginDataDirname);
- *static_cast<char**>(buf) = CPB_StringDup(CPB_Alloc, WideToUTF8(wretval));
+ FilePath path = CommandLine::ForCurrentProcess()->
+ GetSwitchValuePath(switches::kPluginDataDir);
+ DCHECK(!path.empty());
+ std::string retval = WideToUTF8(
+ path.Append(chrome::kChromePluginDataDirname).ToWStringHack());
+ *static_cast<char**>(buf) = CPB_StringDup(CPB_Alloc, retval);
+
return CPERR_SUCCESS;
}
case CPBROWSINGCONTEXT_UI_LOCALE_PTR: {