diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-05 23:50:38 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-05 23:50:38 +0000 |
commit | dabd6f450e9594a8962ef6f79447a8bfdc1c9f05 (patch) | |
tree | aa4c8d04049f0ce9022fc5d4f8229f8a4584428c /views | |
parent | a414e5ee96a40adb231c5b9585db275c10c2c104 (diff) | |
download | chromium_src-dabd6f450e9594a8962ef6f79447a8bfdc1c9f05.zip chromium_src-dabd6f450e9594a8962ef6f79447a8bfdc1c9f05.tar.gz chromium_src-dabd6f450e9594a8962ef6f79447a8bfdc1c9f05.tar.bz2 |
wstring: remove wstring version of SplitString
Retry of r84336.
BUG=23581
Review URL: http://codereview.chromium.org/6930047
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84355 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r-- | views/controls/label.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/views/controls/label.cc b/views/controls/label.cc index 80454c3..627dd98 100644 --- a/views/controls/label.cc +++ b/views/controls/label.cc @@ -141,14 +141,13 @@ const Background* Label::GetMouseOverBackground() const { void Label::SizeToFit(int max_width) { DCHECK(is_multi_line_); - std::vector<std::wstring> lines; - base::SplitString(UTF16ToWideHack(text_), L'\n', &lines); + std::vector<string16> lines; + base::SplitString(text_, '\n', &lines); int label_width = 0; - for (std::vector<std::wstring>::const_iterator iter = lines.begin(); + for (std::vector<string16>::const_iterator iter = lines.begin(); iter != lines.end(); ++iter) { - label_width = std::max(label_width, - font_.GetStringWidth(WideToUTF16Hack(*iter))); + label_width = std::max(label_width, font_.GetStringWidth(*iter)); } label_width += GetInsets().width(); |