| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/quic/core/quic_config.h" | 5 #include "net/quic/core/quic_config.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "net/quic/core/crypto/crypto_handshake_message.h" | 10 #include "net/quic/core/crypto/crypto_handshake_message.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 default_value_ = default_value; | 70 default_value_ = default_value; |
| 71 } | 71 } |
| 72 | 72 |
| 73 uint32_t QuicNegotiableUint32::GetUint32() const { | 73 uint32_t QuicNegotiableUint32::GetUint32() const { |
| 74 if (negotiated()) { | 74 if (negotiated()) { |
| 75 return negotiated_value_; | 75 return negotiated_value_; |
| 76 } | 76 } |
| 77 return default_value_; | 77 return default_value_; |
| 78 } | 78 } |
| 79 | 79 |
| 80 // Returns the maximum value negotiable. |
| 81 uint32_t QuicNegotiableUint32::GetMax() const { |
| 82 return max_value_; |
| 83 } |
| 84 |
| 80 void QuicNegotiableUint32::ToHandshakeMessage( | 85 void QuicNegotiableUint32::ToHandshakeMessage( |
| 81 CryptoHandshakeMessage* out) const { | 86 CryptoHandshakeMessage* out) const { |
| 82 if (negotiated()) { | 87 if (negotiated()) { |
| 83 out->SetValue(tag_, negotiated_value_); | 88 out->SetValue(tag_, negotiated_value_); |
| 84 } else { | 89 } else { |
| 85 out->SetValue(tag_, max_value_); | 90 out->SetValue(tag_, max_value_); |
| 86 } | 91 } |
| 87 } | 92 } |
| 88 | 93 |
| 89 QuicErrorCode QuicNegotiableUint32::ProcessPeerHello( | 94 QuicErrorCode QuicNegotiableUint32::ProcessPeerHello( |
| (...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 error_details); | 758 error_details); |
| 754 } | 759 } |
| 755 if (error == QUIC_NO_ERROR) { | 760 if (error == QUIC_NO_ERROR) { |
| 756 error = force_hol_blocking_.ProcessPeerHello(peer_hello, hello_type, | 761 error = force_hol_blocking_.ProcessPeerHello(peer_hello, hello_type, |
| 757 error_details); | 762 error_details); |
| 758 } | 763 } |
| 759 return error; | 764 return error; |
| 760 } | 765 } |
| 761 | 766 |
| 762 } // namespace net | 767 } // namespace net |
| OLD | NEW |