1 // Copyright (c) 2022 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef NET_HTTP_ALTERNATE_PROTOCOL_USAGE_H_ 6 #define NET_HTTP_ALTERNATE_PROTOCOL_USAGE_H_ 7 8 namespace net { 9 10 // The reason why Chrome uses a specific transport protocol for HTTP semantics. 11 enum AlternateProtocolUsage { 12 // Alternate Protocol was used without racing a normal connection. 13 ALTERNATE_PROTOCOL_USAGE_NO_RACE = 0, 14 // Alternate Protocol was used by winning a race with a normal connection. 15 ALTERNATE_PROTOCOL_USAGE_WON_RACE = 1, 16 // Alternate Protocol was not used by losing a race with a normal connection. 17 ALTERNATE_PROTOCOL_USAGE_MAIN_JOB_WON_RACE = 2, 18 // Alternate Protocol was not used because no Alternate-Protocol information 19 // was available when the request was issued, but an Alternate-Protocol header 20 // was present in the response. 21 ALTERNATE_PROTOCOL_USAGE_MAPPING_MISSING = 3, 22 // Alternate Protocol was not used because it was marked broken. 23 ALTERNATE_PROTOCOL_USAGE_BROKEN = 4, 24 // HTTPS DNS protocol upgrade job was used without racing with a normal 25 // connection and an Alternate Protocol job. 26 ALTERNATE_PROTOCOL_USAGE_DNS_ALPN_H3_JOB_WON_WITHOUT_RACE = 5, 27 // HTTPS DNS protocol upgrade job won a race with a normal connection and 28 // an Alternate Protocol job. 29 ALTERNATE_PROTOCOL_USAGE_DNS_ALPN_H3_JOB_WON_RACE = 6, 30 // This value is used when the reason is unknown and also used as the default 31 // value. 32 ALTERNATE_PROTOCOL_USAGE_UNSPECIFIED_REASON = 7, 33 // Maximum value for the enum. 34 ALTERNATE_PROTOCOL_USAGE_MAX, 35 }; 36 37 } // namespace net 38 39 #endif // NET_HTTP_ALTERNATE_PROTOCOL_USAGE_H_ 40