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) { |