Chromium Code Reviews| Index: chrome/browser/ui/views/select_file_dialog.cc |
| diff --git a/chrome/browser/ui/views/select_file_dialog.cc b/chrome/browser/ui/views/select_file_dialog.cc |
| index 4ce6fa7f95dc9e28da95263ae377d945c69270be..fe51967878569ac61057f5548eec6877b9c9cae9 100644 |
| --- a/chrome/browser/ui/views/select_file_dialog.cc |
| +++ b/chrome/browser/ui/views/select_file_dialog.cc |
| @@ -10,6 +10,7 @@ |
| #include "base/json/json_reader.h" |
| #include "base/scoped_ptr.h" |
| #include "base/string_util.h" |
| +#include "base/sys_string_conversions.h" |
| #include "base/utf_string_conversions.h" |
| #include "base/values.h" |
| #include "chrome/browser/browser_list.h" |
| @@ -263,8 +264,8 @@ void SelectFileDialogImpl::OnDialogClosed(FileBrowseDelegate* delegate, |
| std::string path_string; |
| if (dict->HasKey(kKeyNamePath) && |
| dict->GetString(kKeyNamePath, &path_string)) { |
| - FilePath path = FilePath::FromWStringHack(UTF8ToWide(path_string)); |
| - |
| + FilePath path( |
| + base::SysWideToNativeMB(base::SysUTF8ToWide(path_string))); |
|
tony
2011/01/13 00:18:17
This won't work on Windows, will it?. FilePath on
evanm
2011/01/13 00:19:23
Yeah, we sorta need a FilePath::FromWStringNotAHac
|
| listener_->FileSelected(path, kSaveCompletePageIndex, |
| delegate->params_); |
| notification_fired = true; |
| @@ -280,8 +281,9 @@ void SelectFileDialogImpl::OnDialogClosed(FileBrowseDelegate* delegate, |
| std::string path_string; |
| if (paths_value->GetString(i, &path_string) && |
| !path_string.empty()) { |
| - paths.push_back(FilePath::FromWStringHack( |
| - UTF8ToWide(path_string))); |
| + FilePath path( |
| + base::SysWideToNativeMB(base::SysUTF8ToWide(path_string))); |
| + paths.push_back(path); |
| } |
| } |