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

Unified Diff: ui/gfx/font_list.cc

Issue 1274123003: Update SplitString calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no media changes Created 5 years, 4 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/font_fallback_win.cc ('k') | ui/gfx/render_text_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/font_list.cc
diff --git a/ui/gfx/font_list.cc b/ui/gfx/font_list.cc
index 7bdf903140b4f93ccd5d66f8d477c2ee59bd4f02..f9b34a674e1f7a72d524b854c16d7a4260512f7e 100644
--- a/ui/gfx/font_list.cc
+++ b/ui/gfx/font_list.cc
@@ -34,15 +34,17 @@ bool FontList::ParseDescription(const std::string& description,
DCHECK(style_out);
DCHECK(size_pixels_out);
- base::SplitString(description, ',', families_out);
+ *families_out = base::SplitString(
+ description, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
if (families_out->empty())
return false;
for (auto& family : *families_out)
base::TrimWhitespaceASCII(family, base::TRIM_ALL, &family);
// The last item is "[STYLE1] [STYLE2] [...] SIZE".
- std::vector<std::string> styles;
- base::SplitStringAlongWhitespace(families_out->back(), &styles);
+ std::vector<std::string> styles = base::SplitString(
+ families_out->back(), base::kWhitespaceASCII,
+ base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
families_out->pop_back();
if (styles.empty())
return false;
« no previous file with comments | « ui/gfx/font_fallback_win.cc ('k') | ui/gfx/render_text_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698