diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-30 16:16:19 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-30 16:16:19 +0000 |
commit | a98396cd8879950b01602d5101b92a506baa1889 (patch) | |
tree | 59ecc9d68ac03a27997205c65cb33546c6d38de8 /chrome/browser/views/user_data_dir_dialog.cc | |
parent | e8bac552eec6672febd57c04058c3bd2e3d1279d (diff) | |
download | chromium_src-a98396cd8879950b01602d5101b92a506baa1889.zip chromium_src-a98396cd8879950b01602d5101b92a506baa1889.tar.gz chromium_src-a98396cd8879950b01602d5101b92a506baa1889.tar.bz2 |
Use FilePath in UserDataDirDialog to remove the use of FilePath::FromWStringHack.
Patch by tfarina.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/334017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30584 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/user_data_dir_dialog.cc')
-rw-r--r-- | chrome/browser/views/user_data_dir_dialog.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/views/user_data_dir_dialog.cc b/chrome/browser/views/user_data_dir_dialog.cc index 70f9924..59a8a8a 100644 --- a/chrome/browser/views/user_data_dir_dialog.cc +++ b/chrome/browser/views/user_data_dir_dialog.cc @@ -13,20 +13,20 @@ #include "views/window/window.h" // static -std::wstring UserDataDirDialog::RunUserDataDirDialog( - const std::wstring& user_data_dir) { +FilePath UserDataDirDialog::RunUserDataDirDialog( + const FilePath& user_data_dir) { // When the window closes, it will delete itself. UserDataDirDialog* dlg = new UserDataDirDialog(user_data_dir); MessageLoopForUI::current()->Run(dlg); return dlg->user_data_dir(); } -UserDataDirDialog::UserDataDirDialog(const std::wstring& user_data_dir) +UserDataDirDialog::UserDataDirDialog(const FilePath& user_data_dir) : ALLOW_THIS_IN_INITIALIZER_LIST( select_file_dialog_(SelectFileDialog::Create(this))), is_blocking_(true) { std::wstring message_text = l10n_util::GetStringF( - IDS_CANT_WRITE_USER_DIRECTORY_SUMMARY, user_data_dir); + IDS_CANT_WRITE_USER_DIRECTORY_SUMMARY, user_data_dir.ToWStringHack()); const int kDialogWidth = 400; message_box_view_ = new MessageBoxView(MessageBoxFlags::kIsConfirmMessageBox, message_text.c_str(), std::wstring(), kDialogWidth); @@ -91,7 +91,7 @@ bool UserDataDirDialog::Dispatch(const MSG& msg) { void UserDataDirDialog::FileSelected(const FilePath& path, int index, void* params) { - user_data_dir_ = path.ToWStringHack(); + user_data_dir_ = path; is_blocking_ = false; } |