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

Unified Diff: ui/message_center/views/bounded_label.cc

Issue 1223153003: Move JoinString to the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: windows Created 5 years, 5 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
« no previous file with comments | « ui/message_center/cocoa/notification_controller.mm ('k') | ui/message_center/views/notification_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/views/bounded_label.cc
diff --git a/ui/message_center/views/bounded_label.cc b/ui/message_center/views/bounded_label.cc
index 5bf6f151eec88bb0cf5e43d633645ca55a8d29bf..f9f6ffb6bc3dc431bcc131fc74de955cede72710 100644
--- a/ui/message_center/views/bounded_label.cc
+++ b/ui/message_center/views/bounded_label.cc
@@ -113,10 +113,10 @@ gfx::Size InnerBoundedLabel::GetSizeForWidthAndLines(int width, int lines) {
std::max(width - insets.width(), 0);
int text_height = std::numeric_limits<int>::max();
std::vector<base::string16> wrapped = GetWrappedText(text_width, lines);
- gfx::Canvas::SizeStringInt(JoinString(wrapped, '\n'), font_list(),
- &text_width, &text_height,
- owner_->GetLineHeight(),
- GetTextFlags());
+ gfx::Canvas::SizeStringInt(
+ base::JoinString(wrapped, base::ASCIIToUTF16("\n")),
+ font_list(), &text_width, &text_height, owner_->GetLineHeight(),
+ GetTextFlags());
size.set_width(text_width + insets.width());
size.set_height(text_height + insets.height());
SetCachedSize(key, size);
@@ -177,7 +177,8 @@ void InnerBoundedLabel::OnPaint(gfx::Canvas* canvas) {
gfx::Rect bounds(width(), height);
bounds.Inset(owner_->GetInsets());
if (bounds.width() != wrapped_text_width_ || lines != wrapped_text_lines_) {
- wrapped_text_ = JoinString(GetWrappedText(bounds.width(), lines), '\n');
+ wrapped_text_ = base::JoinString(GetWrappedText(bounds.width(), lines),
+ base::ASCIIToUTF16("\n"));
wrapped_text_width_ = bounds.width();
wrapped_text_lines_ = lines;
}
@@ -343,7 +344,8 @@ void BoundedLabel::OnNativeThemeChanged(const ui::NativeTheme* theme) {
}
base::string16 BoundedLabel::GetWrappedTextForTest(int width, int lines) {
- return JoinString(label_->GetWrappedText(width, lines), '\n');
+ return base::JoinString(label_->GetWrappedText(width, lines),
+ base::ASCIIToUTF16("\n"));
}
} // namespace message_center
« no previous file with comments | « ui/message_center/cocoa/notification_controller.mm ('k') | ui/message_center/views/notification_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698