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

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

Issue 8142026: Revert 104076 - Change std::wstring to string16 for views::Link (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
===================================================================
--- chrome/browser/ui/views/create_application_shortcut_view.cc (revision 104083)
+++ chrome/browser/ui/views/create_application_shortcut_view.cc (working copy)
@@ -93,7 +93,7 @@
icon_->SetImage(icon);
icon_->SetImageSize(gfx::Size(kAppIconSize, kAppIconSize));
- title_ = new views::Label(title_text);
+ title_ = new views::Label(UTF16ToWide(title_text));
title_->SetMultiLine(true);
title_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
title_->SetFont(ResourceBundle::GetSharedInstance().GetFont(
@@ -110,9 +110,9 @@
DCHECK(!description.empty());
static const size_t kMaxLength = 200;
- static const string16 kEllipsis(ASCIIToUTF16(" ... "));
+ static const wchar_t* const kEllipsis = L" ... ";
- string16 text = description;
+ std::wstring text = UTF16ToWide(description);
if (text.length() > kMaxLength) {
text = text.substr(0, kMaxLength);
text += kEllipsis;
@@ -152,7 +152,7 @@
void AppInfoView::UpdateText(const string16& title,
const string16& description) {
- title_->SetText(title);
+ title_->SetText(UTF16ToWideHack(title));
PrepareDescriptionLabel(description);
SetupLayout();
@@ -249,7 +249,7 @@
app_info_ = new AppInfoView(shortcut_info_.title, shortcut_info_.description,
shortcut_info_.favicon);
create_shortcuts_label_ = new views::Label(
- l10n_util::GetStringUTF16(IDS_CREATE_SHORTCUTS_LABEL));
+ UTF16ToWide(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