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

Unified Diff: ui/views/controls/styled_label.cc

Issue 183853011: Move TrimWhitespace to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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/gfx/text_elider.cc ('k') | ui/views/corewm/tooltip_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/styled_label.cc
diff --git a/ui/views/controls/styled_label.cc b/ui/views/controls/styled_label.cc
index d707b6f149f1775b32a37c158139de2524f6f889..24d9862c87ccc30b3ced727b11fafe47e687a783 100644
--- a/ui/views/controls/styled_label.cc
+++ b/ui/views/controls/styled_label.cc
@@ -97,7 +97,7 @@ StyledLabel::StyledLabel(const base::string16& text,
: listener_(listener),
displayed_on_background_color_set_(false),
auto_color_readability_enabled_(true) {
- TrimWhitespace(text, TRIM_TRAILING, &text_);
+ base::TrimWhitespace(text, base::TRIM_TRAILING, &text_);
}
StyledLabel::~StyledLabel() {}
@@ -202,8 +202,10 @@ gfx::Size StyledLabel::CalculateAndDoLayout(int width, bool dry_run) {
while (!remaining_string.empty()) {
// Don't put whitespace at beginning of a line with an exception for the
// first line (so the text's leading whitespace is respected).
- if (x == 0 && line > 0)
- TrimWhitespace(remaining_string, TRIM_LEADING, &remaining_string);
+ if (x == 0 && line > 0) {
+ base::TrimWhitespace(remaining_string, base::TRIM_LEADING,
+ &remaining_string);
+ }
gfx::Range range(gfx::Range::InvalidRange());
if (current_range != style_ranges_.end())
@@ -237,7 +239,8 @@ gfx::Size StyledLabel::CalculateAndDoLayout(int width, bool dry_run) {
// anything; abort.
if (x == 0) {
if (line == 0) {
- TrimWhitespace(remaining_string, TRIM_LEADING, &remaining_string);
+ base::TrimWhitespace(remaining_string, base::TRIM_LEADING,
+ &remaining_string);
continue;
}
break;
« no previous file with comments | « ui/gfx/text_elider.cc ('k') | ui/views/corewm/tooltip_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698