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

Unified Diff: net/tools/quic/quic_in_memory_cache.cc

Issue 2399473003: StringPiece will be replaced with std::string_view. std::string_view doesn't have starts_with. (Closed)
Patch Set: Created 4 years, 2 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/tools/quic/chlo_extractor.cc ('k') | net/tools/quic/test_tools/quic_test_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_in_memory_cache.cc
diff --git a/net/tools/quic/quic_in_memory_cache.cc b/net/tools/quic/quic_in_memory_cache.cc
index ab2ad1e6c4026f3209583e1cc5eb0e99dfce0504..a63f4996e76ea42fad71a64d32c511cf0b1b63c2 100644
--- a/net/tools/quic/quic_in_memory_cache.cc
+++ b/net/tools/quic/quic_in_memory_cache.cc
@@ -119,9 +119,10 @@ void QuicInMemoryCache::ResourceFile::SetHostPathFromBase(StringPiece base) {
}
StringPiece QuicInMemoryCache::ResourceFile::RemoveScheme(StringPiece url) {
- if (url.starts_with("https://")) {
+ if (base::StartsWith(url, "https://", base::CompareCase::INSENSITIVE_ASCII)) {
url.remove_prefix(8);
- } else if (url.starts_with("http://")) {
+ } else if (base::StartsWith(url, "http://",
+ base::CompareCase::INSENSITIVE_ASCII)) {
url.remove_prefix(7);
}
return url;
« no previous file with comments | « net/tools/quic/chlo_extractor.cc ('k') | net/tools/quic/test_tools/quic_test_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698