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..1bfffd332ae83c3d70b2dbc568dd1e0a07c3a222 100644 |
| --- a/chrome/browser/ui/views/select_file_dialog.cc |
| +++ b/chrome/browser/ui/views/select_file_dialog.cc |
| @@ -260,11 +260,9 @@ void SelectFileDialogImpl::OnDialogClosed(FileBrowseDelegate* delegate, |
| if (delegate->type_ == SELECT_OPEN_FILE || |
| delegate->type_ == SELECT_SAVEAS_FILE || |
| delegate->type_ == SELECT_FOLDER) { |
| - std::string path_string; |
| + FilePath path; |
| if (dict->HasKey(kKeyNamePath) && |
| - dict->GetString(kKeyNamePath, &path_string)) { |
| - FilePath path = FilePath::FromWStringHack(UTF8ToWide(path_string)); |
|
tfarina
2011/01/12 01:30:21
Evan, thinking on it again, can't I just do:
FileP
|
| - |
| + dict->GetFilePath(kKeyNamePath, &path)) { |
| listener_->FileSelected(path, kSaveCompletePageIndex, |
| delegate->params_); |
| notification_fired = true; |
| @@ -277,11 +275,9 @@ void SelectFileDialogImpl::OnDialogClosed(FileBrowseDelegate* delegate, |
| std::vector<FilePath> paths; |
| paths.reserve(paths_value->GetSize()); |
| for (size_t i = 0; i < paths_value->GetSize(); ++i) { |
| - std::string path_string; |
| - if (paths_value->GetString(i, &path_string) && |
| - !path_string.empty()) { |
| - paths.push_back(FilePath::FromWStringHack( |
| - UTF8ToWide(path_string))); |
| + FilePath path; |
| + if (paths_value->GetFilePath(i, &path) && !path.empty()) { |
| + paths.push_back(path); |
| } |
| } |