diff options
author | lazyboy@chromium.org <lazyboy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-13 09:14:08 +0000 |
---|---|---|
committer | lazyboy@chromium.org <lazyboy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-13 09:14:08 +0000 |
commit | 8cddbd8649f8cb5a27d48b40f46746335be1787a (patch) | |
tree | 9a4faa029c092d86cdeb12042f1cc10851b68af9 /ui/shell_dialogs | |
parent | 52c14950c0ea8b556b5ee3b6c414e67b0682d517 (diff) | |
download | chromium_src-8cddbd8649f8cb5a27d48b40f46746335be1787a.zip chromium_src-8cddbd8649f8cb5a27d48b40f46746335be1787a.tar.gz chromium_src-8cddbd8649f8cb5a27d48b40f46746335be1787a.tar.bz2 |
gtk: Make directory selection work with upload type
(<input webkitdirectory>).
Right now it hits NOTREACHED().
uploads have type = SELECT_UPLOAD_FOLDER.
They should be treated same as SELECT_OPEN_FILE and SELECT_FOLDER to
save the last opened directory path.
BUG=None
Test=Manually with a packaged app that has input element:
<input type="file" webkitdirectory id="directory"/>
Review URL: https://codereview.chromium.org/111843004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240564 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/shell_dialogs')
-rw-r--r-- | ui/shell_dialogs/gtk/select_file_dialog_impl_gtk.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ui/shell_dialogs/gtk/select_file_dialog_impl_gtk.cc b/ui/shell_dialogs/gtk/select_file_dialog_impl_gtk.cc index 66000dc..ecb97dc 100644 --- a/ui/shell_dialogs/gtk/select_file_dialog_impl_gtk.cc +++ b/ui/shell_dialogs/gtk/select_file_dialog_impl_gtk.cc @@ -291,12 +291,14 @@ void SelectFileDialogImplGTK::AddFilters(GtkFileChooser* chooser) { void SelectFileDialogImplGTK::FileSelected(GtkWidget* dialog, const base::FilePath& path) { - if (type_ == SELECT_SAVEAS_FILE) + if (type_ == SELECT_SAVEAS_FILE) { *last_saved_path_ = path.DirName(); - else if (type_ == SELECT_OPEN_FILE || type_ == SELECT_FOLDER) + } else if (type_ == SELECT_OPEN_FILE || type_ == SELECT_FOLDER || + type_ == SELECT_UPLOAD_FOLDER) { *last_opened_path_ = path.DirName(); - else + } else { NOTREACHED(); + } if (listener_) { GtkFileFilter* selected_filter = |