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

Unified Diff: net/base/data_url.cc

Issue 1215933004: New new versions of Starts/EndsWith and SplitString in net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@starts_with
Patch Set: Created 5 years, 5 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 | « base/strings/string_util.cc ('k') | net/base/host_mapping_rules.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/data_url.cc
diff --git a/net/base/data_url.cc b/net/base/data_url.cc
index e0502d303a8cc240651771f453cc601495315662..4f26456edef2d2a8772d96123c5e075d6b0fbbf0 100644
--- a/net/base/data_url.cc
+++ b/net/base/data_url.cc
@@ -36,9 +36,9 @@ bool DataURL::Parse(const GURL& url, std::string* mime_type,
if (comma == end)
return false;
- std::vector<std::string> meta_data;
- std::string unparsed_meta_data(after_colon, comma);
- base::SplitString(unparsed_meta_data, ';', &meta_data);
+ std::vector<std::string> meta_data =
+ base::SplitString(base::StringPiece(after_colon, comma), ";",
+ base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
std::vector<std::string>::iterator iter = meta_data.begin();
if (iter != meta_data.end()) {
« no previous file with comments | « base/strings/string_util.cc ('k') | net/base/host_mapping_rules.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698