| Index: net/quic/core/quic_config.cc
|
| diff --git a/net/quic/core/quic_config.cc b/net/quic/core/quic_config.cc
|
| index 5a3bccbd90d2350fad5b4f509d6ddeae5c144e6f..784add587329a3858d5828bf338fdbe4d4d00a0c 100644
|
| --- a/net/quic/core/quic_config.cc
|
| +++ b/net/quic/core/quic_config.cc
|
| @@ -114,91 +114,6 @@ QuicErrorCode QuicNegotiableUint32::ProcessPeerHello(
|
| return QUIC_NO_ERROR;
|
| }
|
|
|
| -QuicNegotiableTag::QuicNegotiableTag(QuicTag tag, QuicConfigPresence presence)
|
| - : QuicNegotiableValue(tag, presence),
|
| - negotiated_tag_(0),
|
| - default_value_(0) {}
|
| -
|
| -QuicNegotiableTag::~QuicNegotiableTag() {}
|
| -
|
| -void QuicNegotiableTag::set(const QuicTagVector& possible,
|
| - QuicTag default_value) {
|
| - DCHECK(ContainsQuicTag(possible, default_value));
|
| - possible_values_ = possible;
|
| - default_value_ = default_value;
|
| -}
|
| -
|
| -void QuicNegotiableTag::ToHandshakeMessage(CryptoHandshakeMessage* out) const {
|
| - if (negotiated()) {
|
| - // Because of the way we serialize and parse handshake messages we can
|
| - // serialize this as value and still parse it as a vector.
|
| - out->SetValue(tag_, negotiated_tag_);
|
| - } else {
|
| - out->SetVector(tag_, possible_values_);
|
| - }
|
| -}
|
| -
|
| -QuicErrorCode QuicNegotiableTag::ReadVector(const CryptoHandshakeMessage& msg,
|
| - const QuicTag** out,
|
| - size_t* out_length,
|
| - string* error_details) const {
|
| - DCHECK(error_details != nullptr);
|
| - QuicErrorCode error = msg.GetTaglist(tag_, out, out_length);
|
| - switch (error) {
|
| - case QUIC_CRYPTO_MESSAGE_PARAMETER_NOT_FOUND:
|
| - if (presence_ == PRESENCE_REQUIRED) {
|
| - *error_details = "Missing " + QuicUtils::TagToString(tag_);
|
| - break;
|
| - }
|
| - error = QUIC_NO_ERROR;
|
| - *out_length = 1;
|
| - *out = &default_value_;
|
| -
|
| - case QUIC_NO_ERROR:
|
| - break;
|
| - default:
|
| - *error_details = "Bad " + QuicUtils::TagToString(tag_);
|
| - break;
|
| - }
|
| - return error;
|
| -}
|
| -
|
| -QuicErrorCode QuicNegotiableTag::ProcessPeerHello(
|
| - const CryptoHandshakeMessage& peer_hello,
|
| - HelloType hello_type,
|
| - string* error_details) {
|
| - DCHECK(!negotiated());
|
| - DCHECK(error_details != nullptr);
|
| - const QuicTag* received_tags;
|
| - size_t received_tags_length;
|
| - QuicErrorCode error = ReadVector(peer_hello, &received_tags,
|
| - &received_tags_length, error_details);
|
| - if (error != QUIC_NO_ERROR) {
|
| - return error;
|
| - }
|
| -
|
| - if (hello_type == SERVER) {
|
| - if (received_tags_length != 1 ||
|
| - !ContainsQuicTag(possible_values_, *received_tags)) {
|
| - *error_details = "Invalid " + QuicUtils::TagToString(tag_);
|
| - return QUIC_INVALID_NEGOTIATED_VALUE;
|
| - }
|
| - negotiated_tag_ = *received_tags;
|
| - } else {
|
| - QuicTag negotiated_tag;
|
| - if (!QuicUtils::FindMutualTag(
|
| - possible_values_, received_tags, received_tags_length,
|
| - QuicUtils::LOCAL_PRIORITY, &negotiated_tag, nullptr)) {
|
| - *error_details = "Unsupported " + QuicUtils::TagToString(tag_);
|
| - return QUIC_CRYPTO_MESSAGE_PARAMETER_NO_OVERLAP;
|
| - }
|
| - negotiated_tag_ = negotiated_tag;
|
| - }
|
| -
|
| - set_negotiated(true);
|
| - return QUIC_NO_ERROR;
|
| -}
|
| -
|
| QuicFixedUint32::QuicFixedUint32(QuicTag tag, QuicConfigPresence presence)
|
| : QuicConfigValue(tag, presence),
|
| has_send_value_(false),
|
|
|