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

Unified Diff: net/http/http_server_properties_impl.cc

Issue 1233043003: Remove some legacy versions of StartsWith and EndsWith. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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/http/http_network_transaction.cc ('k') | net/quic/crypto/quic_crypto_client_config.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_server_properties_impl.cc
diff --git a/net/http/http_server_properties_impl.cc b/net/http/http_server_properties_impl.cc
index 15871b530866b780a6d9914b9272aa86fb83e98d..d1c259ed880e2b1d8eb1fa04fd3591e57d2fe9a9 100644
--- a/net/http/http_server_properties_impl.cc
+++ b/net/http/http_server_properties_impl.cc
@@ -117,7 +117,8 @@ void HttpServerPropertiesImpl::InitializeAlternativeServiceServers(
for (AlternativeServiceMap::const_iterator it =
alternative_service_map_.begin();
it != alternative_service_map_.end(); ++it) {
- if (base::EndsWith(it->first.host(), canonical_suffixes_[i], false)) {
+ if (base::EndsWith(it->first.host(), canonical_suffixes_[i],
+ base::CompareCase::INSENSITIVE_ASCII)) {
canonical_host_to_origin_map_[canonical_host] = it->first;
break;
}
@@ -260,7 +261,8 @@ std::string HttpServerPropertiesImpl::GetCanonicalSuffix(
// suffix.
for (size_t i = 0; i < canonical_suffixes_.size(); ++i) {
std::string canonical_suffix = canonical_suffixes_[i];
- if (base::EndsWith(host, canonical_suffixes_[i], false)) {
+ if (base::EndsWith(host, canonical_suffixes_[i],
+ base::CompareCase::INSENSITIVE_ASCII)) {
return canonical_suffix;
}
}
@@ -368,7 +370,8 @@ bool HttpServerPropertiesImpl::SetAlternativeServices(
// canonical host.
for (size_t i = 0; i < canonical_suffixes_.size(); ++i) {
std::string canonical_suffix = canonical_suffixes_[i];
- if (base::EndsWith(origin.host(), canonical_suffixes_[i], false)) {
+ if (base::EndsWith(origin.host(), canonical_suffixes_[i],
+ base::CompareCase::INSENSITIVE_ASCII)) {
HostPortPair canonical_host(canonical_suffix, origin.port());
canonical_host_to_origin_map_[canonical_host] = origin;
break;
@@ -611,7 +614,8 @@ HttpServerPropertiesImpl::CanonicalHostMap::const_iterator
HttpServerPropertiesImpl::GetCanonicalHost(HostPortPair server) const {
for (size_t i = 0; i < canonical_suffixes_.size(); ++i) {
std::string canonical_suffix = canonical_suffixes_[i];
- if (base::EndsWith(server.host(), canonical_suffixes_[i], false)) {
+ if (base::EndsWith(server.host(), canonical_suffixes_[i],
+ base::CompareCase::INSENSITIVE_ASCII)) {
HostPortPair canonical_host(canonical_suffix, server.port());
return canonical_host_to_origin_map_.find(canonical_host);
}
« no previous file with comments | « net/http/http_network_transaction.cc ('k') | net/quic/crypto/quic_crypto_client_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698