| Index: chrome/browser/browser.cc
|
| diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
|
| index 2cca70402e693649ec472fa03452e1f81650304a..6924de0bdbc722f9dbd6ae93b1c25bb4144da968 100644
|
| --- a/chrome/browser/browser.cc
|
| +++ b/chrome/browser/browser.cc
|
| @@ -1578,10 +1578,12 @@ void Browser::OpenFile() {
|
| if (!select_file_dialog_.get())
|
| select_file_dialog_ = SelectFileDialog::Create(this);
|
|
|
| + const FilePath directory = profile_->last_selected_directory();
|
| +
|
| // TODO(beng): figure out how to juggle this.
|
| gfx::NativeWindow parent_window = window_->GetNativeHandle();
|
| select_file_dialog_->SelectFile(SelectFileDialog::SELECT_OPEN_FILE,
|
| - string16(), FilePath(),
|
| + string16(), directory,
|
| NULL, 0, FILE_PATH_LITERAL(""),
|
| parent_window, NULL);
|
| #endif
|
| @@ -2850,6 +2852,7 @@ void Browser::OnDidGetApplicationInfo(TabContents* tab_contents,
|
| // Browser, SelectFileDialog::Listener implementation:
|
|
|
| void Browser::FileSelected(const FilePath& path, int index, void* params) {
|
| + profile_->set_last_selected_directory(path.DirName());
|
| GURL file_url = net::FilePathToFileURL(path);
|
| if (!file_url.is_empty())
|
| OpenURL(file_url, GURL(), CURRENT_TAB, PageTransition::TYPED);
|
|
|