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

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: . 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
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)

Powered by Google App Engine
This is Rietveld 408576698