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

Unified Diff: chrome/browser/views/user_data_dir_dialog.cc

Issue 334017: Use FilePath in UserDataDirDialog to remove the use of FilePath::FromWString... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 2 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/views/user_data_dir_dialog.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/user_data_dir_dialog.cc
===================================================================
--- chrome/browser/views/user_data_dir_dialog.cc (revision 29381)
+++ chrome/browser/views/user_data_dir_dialog.cc (working copy)
@@ -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 @@
void UserDataDirDialog::FileSelected(const FilePath& path,
int index, void* params) {
- user_data_dir_ = path.ToWStringHack();
+ user_data_dir_ = path;
is_blocking_ = false;
}
« no previous file with comments | « chrome/browser/views/user_data_dir_dialog.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698