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

Unified Diff: ui/gfx/font_fallback_win.cc

Issue 1272823003: Update SplitString calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/events/ozone/evdev/libgestures_glue/gesture_property_provider.cc ('k') | ui/gfx/font_list.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/font_fallback_win.cc
diff --git a/ui/gfx/font_fallback_win.cc b/ui/gfx/font_fallback_win.cc
index 6b9c6206bf572ce3a00f767c7a71b3afafef4241..e5771cff628f694f2884899d34948aa82a073d98 100644
--- a/ui/gfx/font_fallback_win.cc
+++ b/ui/gfx/font_fallback_win.cc
@@ -180,8 +180,8 @@ namespace internal {
void ParseFontLinkEntry(const std::string& entry,
std::string* filename,
std::string* font_name) {
- std::vector<std::string> parts;
- base::SplitString(entry, ',', &parts);
+ std::vector<std::string> parts = base::SplitString(
+ entry, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
filename->clear();
font_name->clear();
if (parts.size() > 0)
@@ -199,7 +199,8 @@ void ParseFontFamilyString(const std::string& family,
// followed optionally by the font family name and a pair of integer scaling
// factors.
// TODO(asvitkine): Should we support these scaling factors?
- base::SplitString(family, '&', font_names);
+ *font_names = base::SplitString(
+ family, "&", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
if (!font_names->empty()) {
const size_t index = font_names->back().find('(');
if (index != std::string::npos) {
« no previous file with comments | « ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.cc ('k') | ui/gfx/font_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698