Chromium Code Reviews| Index: chrome/browser/ui/browser.cc |
| diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc |
| index 777e9a9b42300b47d4ae87bd77b12142817a46a9..422603ad7bcd057596e18ea19e3a150eb795ba8f 100644 |
| --- a/chrome/browser/ui/browser.cc |
| +++ b/chrome/browser/ui/browser.cc |
| @@ -185,6 +185,7 @@ |
| #include "net/cookies/cookie_monster.h" |
| #include "net/url_request/url_request_context.h" |
| #include "ui/base/animation/animation.h" |
| +#include "ui/base/dialogs/selected_file_info.h" |
| #include "ui/base/l10n/l10n_util.h" |
| #include "ui/gfx/point.h" |
| #include "webkit/glue/web_intent_data.h" |
| @@ -1754,7 +1755,16 @@ void Browser::OnZoomChanged(TabContents* source, |
| // Browser, SelectFileDialog::Listener implementation: |
| void Browser::FileSelected(const FilePath& path, int index, void* params) { |
| - profile_->set_last_selected_directory(path.DirName()); |
| + FileSelectedWithExtraInfo(ui::SelectedFileInfo(path, path), index, params); |
| +} |
| + |
| +void Browser::FileSelectedWithExtraInfo( |
| + const ui::SelectedFileInfo& file_info, |
| + int index, |
| + void* params) { |
| + profile_->set_last_selected_directory(file_info.file_path.DirName()); |
| + |
| + FilePath path = file_info.real_path; |
|
achuithb
2012/07/24 20:13:05
nit: const FilePath& would save a copy.
tbarzic
2012/07/25 02:02:54
Done.
|
| GURL file_url = net::FilePathToFileURL(path); |
| #if defined(OS_CHROMEOS) |