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

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

Issue 8113031: Change std::wstring to string16 for views::Label and views::Link (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 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
Index: chrome/browser/ui/views/create_application_shortcut_view.cc
diff --git a/chrome/browser/ui/views/create_application_shortcut_view.cc b/chrome/browser/ui/views/create_application_shortcut_view.cc
index 9c6c252b41240169c421b3bf447250f51ba9ae24..596df6a1570537c63f4aa02f479a4d2a2c0476ce 100644
--- a/chrome/browser/ui/views/create_application_shortcut_view.cc
+++ b/chrome/browser/ui/views/create_application_shortcut_view.cc
@@ -93,7 +93,7 @@ void AppInfoView::Init(const string16& title_text,
icon_->SetImage(icon);
icon_->SetImageSize(gfx::Size(kAppIconSize, kAppIconSize));
- title_ = new views::Label(UTF16ToWide(title_text));
+ title_ = new views::Label(title_text);
title_->SetMultiLine(true);
title_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
title_->SetFont(ResourceBundle::GetSharedInstance().GetFont(
@@ -110,9 +110,9 @@ void AppInfoView::PrepareDescriptionLabel(const string16& description) {
DCHECK(!description.empty());
static const size_t kMaxLength = 200;
- static const wchar_t* const kEllipsis = L" ... ";
+ static const string16 kEllipsis(ASCIIToUTF16(" ... "));
- std::wstring text = UTF16ToWide(description);
+ string16 text = description;
if (text.length() > kMaxLength) {
text = text.substr(0, kMaxLength);
text += kEllipsis;
@@ -152,7 +152,7 @@ void AppInfoView::SetupLayout() {
void AppInfoView::UpdateText(const string16& title,
const string16& description) {
- title_->SetText(UTF16ToWideHack(title));
+ title_->SetText(title);
PrepareDescriptionLabel(description);
SetupLayout();
@@ -249,7 +249,7 @@ void CreateApplicationShortcutView::InitControls() {
app_info_ = new AppInfoView(shortcut_info_.title, shortcut_info_.description,
shortcut_info_.favicon);
create_shortcuts_label_ = new views::Label(
- UTF16ToWide(l10n_util::GetStringUTF16(IDS_CREATE_SHORTCUTS_LABEL)));
+ l10n_util::GetStringUTF16(IDS_CREATE_SHORTCUTS_LABEL));
create_shortcuts_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
desktop_check_box_ = AddCheckbox(UTF16ToWide(
« no previous file with comments | « chrome/browser/ui/views/content_setting_bubble_contents.cc ('k') | chrome/browser/ui/views/default_search_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698