summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/options
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-06 18:08:34 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-06 18:08:34 +0000
commit561abe688fc5ebcec902ea6cc2ccb4122441595e (patch)
tree5d5b001676b82c824d22619f0cc3a92b22648ab2 /chrome/browser/views/options
parent5ce729688e2b16ebc97decb032175ba230855c1d (diff)
downloadchromium_src-561abe688fc5ebcec902ea6cc2ccb4122441595e.zip
chromium_src-561abe688fc5ebcec902ea6cc2ccb4122441595e.tar.gz
chromium_src-561abe688fc5ebcec902ea6cc2ccb4122441595e.tar.bz2
First pass of refactoring dialogs.
Review URL: http://codereview.chromium.org/60110 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13168 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/options')
-rw-r--r--chrome/browser/views/options/content_page_view.cc9
-rw-r--r--chrome/browser/views/options/content_page_view.h2
2 files changed, 6 insertions, 5 deletions
diff --git a/chrome/browser/views/options/content_page_view.cc b/chrome/browser/views/options/content_page_view.cc
index 4072111..e6966e0 100644
--- a/chrome/browser/views/options/content_page_view.cc
+++ b/chrome/browser/views/options/content_page_view.cc
@@ -194,11 +194,11 @@ ContentPageView::~ContentPageView() {
////////////////////////////////////////////////////////////////////////////////
// ContentPageView, SelectFileDialog::Listener implementation:
-void ContentPageView::FileSelected(const std::wstring& path,
+void ContentPageView::FileSelected(const FilePath& path,
int index, void* params) {
UserMetricsRecordAction(L"Options_SetDownloadDirectory",
profile()->GetPrefs());
- default_download_location_.SetValue(path);
+ default_download_location_.SetValue(path.ToWStringHack());
// We need to call this manually here since because we're setting the value
// through the pref member which avoids notifying the listener that set the
// value.
@@ -214,8 +214,9 @@ void ContentPageView::ButtonPressed(views::Button* sender) {
l10n_util::GetString(IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_TITLE);
select_file_dialog_->SelectFile(SelectFileDialog::SELECT_FOLDER,
dialog_title,
- profile()->GetPrefs()->GetString(
- prefs::kDownloadDefaultDirectory),
+ FilePath::FromWStringHack(
+ profile()->GetPrefs()->GetString(
+ prefs::kDownloadDefaultDirectory)),
std::wstring(), 0, std::wstring(),
GetRootWindow(),
NULL);
diff --git a/chrome/browser/views/options/content_page_view.h b/chrome/browser/views/options/content_page_view.h
index f7b6b28..98d2030 100644
--- a/chrome/browser/views/options/content_page_view.h
+++ b/chrome/browser/views/options/content_page_view.h
@@ -34,7 +34,7 @@ class ContentPageView : public OptionsPageView,
virtual void ButtonPressed(views::Button* sender);
// SelectFileDialog::Listener implementation:
- virtual void FileSelected(const std::wstring& path, int index, void* params);
+ virtual void FileSelected(const FilePath& path, int index, void* params);
// OptionsPageView implementation:
virtual bool CanClose() const;