Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5802)

Unified Diff: chrome/browser/ui/browser.cc

Issue 10804026: Fix open dialog not remembering last opened folder on drive (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 597c6649ee2ad7733963a765192c798a32579ba0..c7d3d829efabcce1415f4fd303e4700cbc848c0d 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"
@@ -1739,7 +1740,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());
+
+ const FilePath& path = file_info.local_path;
GURL file_url = net::FilePathToFileURL(path);
#if defined(OS_CHROMEOS)
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698