summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/bookmark_manager_view.cc
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/bookmark_manager_view.cc
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/bookmark_manager_view.cc')
-rw-r--r--chrome/browser/views/bookmark_manager_view.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/chrome/browser/views/bookmark_manager_view.cc b/chrome/browser/views/bookmark_manager_view.cc
index bc0b344..b9fccb1a 100644
--- a/chrome/browser/views/bookmark_manager_view.cc
+++ b/chrome/browser/views/bookmark_manager_view.cc
@@ -517,7 +517,7 @@ void BookmarkManagerView::ExecuteCommand(int id) {
}
}
-void BookmarkManagerView::FileSelected(const std::wstring& path,
+void BookmarkManagerView::FileSelected(const FilePath& path,
int index,
void* params) {
int id = reinterpret_cast<int>(params);
@@ -526,7 +526,7 @@ void BookmarkManagerView::FileSelected(const std::wstring& path,
ImporterHost* host = new ImporterHost();
ProfileInfo profile_info;
profile_info.browser_type = BOOKMARKS_HTML;
- profile_info.source_path = path;
+ profile_info.source_path = path.ToWStringHack();
StartImportingWithUI(GetWidget()->GetNativeView(), FAVORITES, host,
profile_info, profile_,
new ImportObserverImpl(profile()), false);
@@ -534,7 +534,7 @@ void BookmarkManagerView::FileSelected(const std::wstring& path,
if (g_browser_process->io_thread()) {
bookmark_html_writer::WriteBookmarks(
g_browser_process->io_thread()->message_loop(), GetBookmarkModel(),
- path);
+ path.ToWStringHack());
}
} else {
NOTREACHED();
@@ -718,8 +718,10 @@ void BookmarkManagerView::ShowImportBookmarksFileChooser() {
win_util::GetFileFilterFromExtensions(L"*.html;*.htm", true);
select_file_dialog_ = SelectFileDialog::Create(this);
select_file_dialog_->SelectFile(
- SelectFileDialog::SELECT_OPEN_FILE, std::wstring(), L"bookmarks.html",
- filter_string, 0, std::wstring(), GetWidget()->GetNativeView(),
+ SelectFileDialog::SELECT_OPEN_FILE, std::wstring(),
+ FilePath(FILE_PATH_LITERAL("bookmarks.html")), filter_string, 0,
+ std::wstring(),
+ GetWidget()->GetNativeView(),
reinterpret_cast<void*>(IDS_BOOKMARK_MANAGER_IMPORT_MENU));
}
@@ -729,7 +731,8 @@ void BookmarkManagerView::ShowExportBookmarksFileChooser() {
select_file_dialog_ = SelectFileDialog::Create(this);
select_file_dialog_->SelectFile(
- SelectFileDialog::SELECT_SAVEAS_FILE, std::wstring(), L"bookmarks.html",
+ SelectFileDialog::SELECT_SAVEAS_FILE, std::wstring(),
+ FilePath(FILE_PATH_LITERAL("bookmarks.html")),
win_util::GetFileFilterFromPath(L"bookmarks.html"), 0, L"html",
GetWidget()->GetNativeView(),
reinterpret_cast<void*>(IDS_BOOKMARK_MANAGER_EXPORT_MENU));