Commit 8da19bca authored by tfarina@chromium.org's avatar tfarina@chromium.org

views/importer: Avoid conversions to wide in ImportProgressDialogView.

BUG=23581
R=pkasting@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10221023

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134556 0039d316-1c4b-4281-b951-d872f2087c98
parent 2a476c9d
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include "chrome/browser/ui/views/importer/import_progress_dialog_view.h" #include "chrome/browser/ui/views/importer/import_progress_dialog_view.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/importer/importer_host.h" #include "chrome/browser/importer/importer_host.h"
#include "chrome/browser/importer/importer_observer.h" #include "chrome/browser/importer/importer_observer.h"
#include "chrome/browser/importer/importer_progress_dialog.h" #include "chrome/browser/importer/importer_progress_dialog.h"
...@@ -44,12 +43,10 @@ ImportProgressDialogView::ImportProgressDialogView( ...@@ -44,12 +43,10 @@ ImportProgressDialogView::ImportProgressDialogView(
importer_observer_(importer_observer), importer_observer_(importer_observer),
importing_(true), importing_(true),
bookmarks_import_(bookmarks_import) { bookmarks_import_(bookmarks_import) {
std::wstring info_text = bookmarks_import ? const string16 info_text = bookmarks_import ?
UTF16ToWide(l10n_util::GetStringUTF16(IDS_IMPORT_BOOKMARKS)) : l10n_util::GetStringUTF16(IDS_IMPORT_BOOKMARKS) :
UTF16ToWide(l10n_util::GetStringFUTF16( l10n_util::GetStringFUTF16(IDS_IMPORT_PROGRESS_INFO, importer_name);
IDS_IMPORT_PROGRESS_INFO, importer_name));
label_info_ = new views::Label(info_text); label_info_ = new views::Label(info_text);
importer_host_->SetObserver(this);
label_info_->SetMultiLine(true); label_info_->SetMultiLine(true);
label_info_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); label_info_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
label_bookmarks_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); label_bookmarks_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
...@@ -58,6 +55,8 @@ ImportProgressDialogView::ImportProgressDialogView( ...@@ -58,6 +55,8 @@ ImportProgressDialogView::ImportProgressDialogView(
label_history_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); label_history_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
label_cookies_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); label_cookies_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
importer_host_->SetObserver(this);
// These are scoped pointers, so we don't need the parent to delete them. // These are scoped pointers, so we don't need the parent to delete them.
state_bookmarks_->set_parent_owned(false); state_bookmarks_->set_parent_owned(false);
state_searches_->set_parent_owned(false); state_searches_->set_parent_owned(false);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment