Chromium Code Reviews| Index: base/file_path.cc |
| diff --git a/base/file_path.cc b/base/file_path.cc |
| index 9bc46f0f8c48cd16ff626135022cfa4b1eee97af..5f1375adb5b8e9c98942bc69a474a8761d7682bb 100644 |
| --- a/base/file_path.cc |
| +++ b/base/file_path.cc |
| @@ -513,10 +513,14 @@ bool FilePath::ReferencesParent() const { |
| } |
| #if defined(OS_POSIX) |
| - |
| // See file_path.h for a discussion of the encoding of paths on POSIX |
| -// platforms. These *Hack() functions are not quite correct, but they're |
| -// only temporary while we fix the remainder of the code. |
| +// platforms. These encoding conversion functions are not quite correct. |
| + |
| +string16 FilePath::LossyDisplayName() const { |
| + return WideToUTF16(base::SysNativeMBToWide(path_)); |
|
Mark Mentovai
2011/02/01 22:42:44
If on Mac, you can just do an 8-to-16 conversion.
|
| +} |
| + |
| +// The *Hack functions are temporary while we fix the remainder of the code. |
| // Remember to remove the #includes at the top when you remove these. |
| // static |
| @@ -527,6 +531,10 @@ std::wstring FilePath::ToWStringHack() const { |
| return base::SysNativeMBToWide(path_); |
| } |
| #elif defined(OS_WIN) |
| +string16 FilePath::LossyDisplayName() const { |
| + return path_; |
| +} |
| + |
| // static |
| FilePath FilePath::FromWStringHack(const std::wstring& wstring) { |
| return FilePath(wstring); |