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

Unified Diff: chrome/browser/ui/views/first_run_bubble.cc

Issue 6088008: Remove wstring from l10n_util. Part 7.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 12 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
Index: chrome/browser/ui/views/first_run_bubble.cc
===================================================================
--- chrome/browser/ui/views/first_run_bubble.cc (revision 70562)
+++ chrome/browser/ui/views/first_run_bubble.cc (working copy)
@@ -100,22 +100,25 @@
const gfx::Font& font =
ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::MediumFont);
- label1_ = new views::Label(l10n_util::GetString(IDS_FR_BUBBLE_TITLE));
+ label1_ = new views::Label(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_FR_BUBBLE_TITLE)));
label1_->SetFont(font.DeriveFont(3, gfx::Font::BOLD));
label1_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
AddChildView(label1_);
gfx::Size ps = GetPreferredSize();
- label2_ = new views::Label(l10n_util::GetString(IDS_FR_BUBBLE_SUBTEXT));
+ label2_ = new views::Label(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_FR_BUBBLE_SUBTEXT)));
label2_->SetMultiLine(true);
label2_->SetFont(font);
label2_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
label2_->SizeToFit(ps.width() - kBubblePadding * 2);
AddChildView(label2_);
- std::wstring question_str = l10n_util::GetStringF(IDS_FR_BUBBLE_QUESTION,
- UTF16ToWideHack(GetDefaultSearchEngineName(profile)));
+ std::wstring question_str = UTF16ToWide(l10n_util::GetStringFUTF16(
+ IDS_FR_BUBBLE_QUESTION,
+ GetDefaultSearchEngineName(profile)));
label3_ = new views::Label(question_str);
label3_->SetMultiLine(true);
label3_->SetFont(font);
@@ -123,13 +126,15 @@
label3_->SizeToFit(ps.width() - kBubblePadding * 2);
AddChildView(label3_);
- std::wstring keep_str = l10n_util::GetStringF(IDS_FR_BUBBLE_OK,
- UTF16ToWideHack(GetDefaultSearchEngineName(profile)));
+ std::wstring keep_str = UTF16ToWide(l10n_util::GetStringFUTF16(
+ IDS_FR_BUBBLE_OK,
+ GetDefaultSearchEngineName(profile)));
keep_button_ = new views::NativeButton(this, keep_str);
keep_button_->SetIsDefault(true);
AddChildView(keep_button_);
- std::wstring change_str = l10n_util::GetString(IDS_FR_BUBBLE_CHANGE);
+ std::wstring change_str =
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_FR_BUBBLE_CHANGE));
change_button_ = new views::NativeButton(this, change_str);
AddChildView(change_button_);
}
@@ -259,20 +264,23 @@
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
const gfx::Font& font = rb.GetFont(ResourceBundle::MediumFont);
- label1_ = new views::Label(l10n_util::GetString(IDS_FR_OEM_BUBBLE_TITLE_1));
+ label1_ = new views::Label(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_FR_OEM_BUBBLE_TITLE_1)));
label1_->SetFont(font.DeriveFont(3, gfx::Font::BOLD));
label1_->SetColor(SK_ColorRED);
label1_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
AddChildView(label1_);
- label2_ = new views::Label(l10n_util::GetString(IDS_FR_OEM_BUBBLE_TITLE_2));
+ label2_ = new views::Label(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_FR_OEM_BUBBLE_TITLE_2)));
label2_->SetFont(font.DeriveFont(3, gfx::Font::BOLD));
label2_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
AddChildView(label2_);
gfx::Size ps = GetPreferredSize();
- label3_ = new views::Label(l10n_util::GetString(IDS_FR_OEM_BUBBLE_SUBTEXT));
+ label3_ = new views::Label(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_FR_OEM_BUBBLE_SUBTEXT)));
label3_->SetMultiLine(true);
label3_->SetFont(font);
label3_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
@@ -402,15 +410,17 @@
const gfx::Font& font =
ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::MediumFont);
- label1_ = new views::Label(l10n_util::GetStringF(IDS_FR_SE_BUBBLE_TITLE,
- UTF16ToWideHack(GetDefaultSearchEngineName(profile_))));
+ label1_ = new views::Label(UTF16ToWide(l10n_util::GetStringFUTF16(
+ IDS_FR_SE_BUBBLE_TITLE,
+ GetDefaultSearchEngineName(profile_))));
label1_->SetFont(font.DeriveFont(3, gfx::Font::BOLD));
label1_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
AddChildView(label1_);
gfx::Size ps = GetPreferredSize();
- label2_ = new views::Label(l10n_util::GetString(IDS_FR_BUBBLE_SUBTEXT));
+ label2_ = new views::Label(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_FR_BUBBLE_SUBTEXT)));
label2_->SetMultiLine(true);
label2_->SetFont(font);
label2_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);

Powered by Google App Engine
This is Rietveld 408576698