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

Unified Diff: net/quic/quic_utils.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 | « net/proxy/proxy_config_service_linux.cc ('k') | net/server/http_server_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_utils.cc
diff --git a/net/quic/quic_utils.cc b/net/quic/quic_utils.cc
index 3d59b07f8a44e7bc16b2281695d8d232d61bcce7..7895fee5e1b471a8352a119a52b4afaacb71a8eb 100644
--- a/net/quic/quic_utils.cc
+++ b/net/quic/quic_utils.cc
@@ -292,11 +292,11 @@ string QuicUtils::TagToString(QuicTag tag) {
QuicTagVector QuicUtils::ParseQuicConnectionOptions(
const std::string& connection_options) {
QuicTagVector options;
- std::vector<std::string> tokens;
- base::SplitString(connection_options, ',', &tokens);
// Tokens are expected to be no more than 4 characters long, but we
// handle overflow gracefully.
- for (const std::string& token : tokens) {
+ for (const base::StringPiece& token :
+ base::SplitStringPiece(connection_options, ",", base::TRIM_WHITESPACE,
+ base::SPLIT_WANT_ALL)) {
uint32 option = 0;
for (char token_char : base::Reversed(token)) {
option <<= 8;
« no previous file with comments | « net/proxy/proxy_config_service_linux.cc ('k') | net/server/http_server_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698