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

Unified Diff: net/http/http_server_properties_impl.cc

Issue 2373663002: Unify enum NextProto and enum AlternateProtocol. (Closed)
Patch Set: Fix compile errors. Created 4 years, 1 month 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_server_properties.cc ('k') | net/http/http_server_properties_impl_unittest.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 79c6e08dca802ef97d58f144b24b56e729df92c1..d66987869f02d84920b4f679c11563532d36a7d3 100644
--- a/net/http/http_server_properties_impl.cc
+++ b/net/http/http_server_properties_impl.cc
@@ -246,7 +246,7 @@ bool HttpServerPropertiesImpl::SupportsRequestPriority(
GetAlternativeServices(server);
for (const AlternativeService& alternative_service :
alternative_service_vector) {
- if (alternative_service.protocol == QUIC) {
+ if (alternative_service.protocol == kProtoQUIC) {
return true;
}
}
@@ -340,7 +340,7 @@ AlternativeServiceVector HttpServerPropertiesImpl::GetAlternativeServices(
// If the alternative service is equivalent to the origin (same host, same
// port, and both TCP), skip it.
if (host_port_pair.Equals(alternative_service.host_port_pair()) &&
- alternative_service.protocol == NPN_HTTP_2) {
+ alternative_service.protocol == kProtoHTTP2) {
++it;
continue;
}
@@ -472,7 +472,7 @@ void HttpServerPropertiesImpl::MarkAlternativeServiceBroken(
const AlternativeService& alternative_service) {
// Empty host means use host of origin, callers are supposed to substitute.
DCHECK(!alternative_service.host.empty());
- if (alternative_service.protocol == UNINITIALIZED_ALTERNATE_PROTOCOL) {
+ if (alternative_service.protocol == kProtoUnknown) {
LOG(DFATAL) << "Trying to mark unknown alternate protocol broken.";
return;
}
@@ -513,7 +513,7 @@ bool HttpServerPropertiesImpl::IsAlternativeServiceBroken(
bool HttpServerPropertiesImpl::WasAlternativeServiceRecentlyBroken(
const AlternativeService& alternative_service) {
- if (alternative_service.protocol == UNINITIALIZED_ALTERNATE_PROTOCOL)
+ if (alternative_service.protocol == kProtoUnknown)
return false;
return base::ContainsKey(recently_broken_alternative_services_,
alternative_service);
@@ -521,7 +521,7 @@ bool HttpServerPropertiesImpl::WasAlternativeServiceRecentlyBroken(
void HttpServerPropertiesImpl::ConfirmAlternativeService(
const AlternativeService& alternative_service) {
- if (alternative_service.protocol == UNINITIALIZED_ALTERNATE_PROTOCOL)
+ if (alternative_service.protocol == kProtoUnknown)
return;
broken_alternative_services_.erase(alternative_service);
recently_broken_alternative_services_.erase(alternative_service);
« no previous file with comments | « net/http/http_server_properties.cc ('k') | net/http/http_server_properties_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698