Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(584)

Unified Diff: chrome/browser/chrome_plugin_host.cc

Issue 6246036: FilePath: Remove most of ToWStringHack, adding a LossyDisplayName() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chrome_plugin_host.cc
diff --git a/chrome/browser/chrome_plugin_host.cc b/chrome/browser/chrome_plugin_host.cc
index fc7b9ceb5db4e009394b7175cd87e1bf0e042d12..1fe424b90c937b5c7d66060cf9761317871bf7d5 100644
--- a/chrome/browser/chrome_plugin_host.cc
+++ b/chrome/browser/chrome_plugin_host.cc
@@ -464,8 +464,10 @@ int STDCALL CPB_GetBrowsingContextInfo(
if (!service)
return CPERR_FAILURE;
FilePath path = service->GetChromePluginDataDir();
- 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());
Evan Martin 2011/02/01 22:31:24 In retrospect, as a way of asserting this is Windo
Mark Mentovai 2011/02/01 22:42:44 Evan Martin wrote:
Avi (use Gerrit) 2011/02/01 22:46:25 That sounds good.
*static_cast<char**>(buf) = CPB_StringDup(CPB_Alloc, retval);
return CPERR_SUCCESS;
}

Powered by Google App Engine
This is Rietveld 408576698