#ifndef NET_HTTP_ALTERNATIVE_SERVICE_H_
#define NET_HTTP_ALTERNATIVE_SERVICE_H_
#include <stdint.h>
#include <algorithm>
#include <ostream>
#include <string>
#include "base/time/time.h"
#include "net/base/host_port_pair.h"
#include "net/base/net_export.h"
#include "net/http/alternate_protocol_usage.h"
#include "net/quic/quic_http_utils.h"
#include "net/socket/next_proto.h"
#include "net/third_party/quiche/src/quiche/quic/core/quic_versions.h"
#include "net/third_party/quiche/src/quiche/spdy/core/spdy_protocol.h"
namespace net {
NET_EXPORT void HistogramAlternateProtocolUsage(AlternateProtocolUsage usage,
bool is_google_host);
enum BrokenAlternateProtocolLocation { … };
NET_EXPORT void HistogramBrokenAlternateProtocolLocation(
BrokenAlternateProtocolLocation location);
NET_EXPORT bool IsAlternateProtocolValid(NextProto protocol);
NET_EXPORT bool IsProtocolEnabled(NextProto protocol,
bool is_http2_enabled,
bool is_quic_enabled);
struct NET_EXPORT AlternativeService { … };
NET_EXPORT_PRIVATE std::ostream& operator<<(
std::ostream& os,
const AlternativeService& alternative_service);
class NET_EXPORT_PRIVATE AlternativeServiceInfo { … };
AlternativeServiceInfoVector;
NET_EXPORT_PRIVATE AlternativeServiceInfoVector ProcessAlternativeServices(
const spdy::SpdyAltSvcWireFormat::AlternativeServiceVector&
alternative_service_vector,
bool is_http2_enabled,
bool is_quic_enabled,
const quic::ParsedQuicVersionVector& supported_quic_versions);
}
#endif