| 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/quic_config.h" | 5 #include "net/quic/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/quic_sent_packet_manager.h" | 10 #include "net/quic/quic_sent_packet_manager.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 QuicErrorCode error = msg.GetUint32(tag_, out); | 55 QuicErrorCode error = msg.GetUint32(tag_, out); |
| 56 switch (error) { | 56 switch (error) { |
| 57 case QUIC_CRYPTO_MESSAGE_PARAMETER_NOT_FOUND: | 57 case QUIC_CRYPTO_MESSAGE_PARAMETER_NOT_FOUND: |
| 58 if (presence_ == QuicNegotiableValue::PRESENCE_REQUIRED) { | 58 if (presence_ == QuicNegotiableValue::PRESENCE_REQUIRED) { |
| 59 *error_details = "Missing " + QuicUtils::TagToString(tag_); | 59 *error_details = "Missing " + QuicUtils::TagToString(tag_); |
| 60 break; | 60 break; |
| 61 } | 61 } |
| 62 error = QUIC_NO_ERROR; | 62 error = QUIC_NO_ERROR; |
| 63 *out = default_value_; | 63 *out = default_value_; |
| 64 | 64 |
| 65 FALLTHROUGH_INTENDED; |
| 65 case QUIC_NO_ERROR: | 66 case QUIC_NO_ERROR: |
| 66 break; | 67 break; |
| 67 default: | 68 default: |
| 68 *error_details = "Bad " + QuicUtils::TagToString(tag_); | 69 *error_details = "Bad " + QuicUtils::TagToString(tag_); |
| 69 break; | 70 break; |
| 70 } | 71 } |
| 71 return error; | 72 return error; |
| 72 } | 73 } |
| 73 | 74 |
| 74 QuicErrorCode QuicNegotiableUint32::ProcessClientHello( | 75 QuicErrorCode QuicNegotiableUint32::ProcessClientHello( |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 switch (error) { | 154 switch (error) { |
| 154 case QUIC_CRYPTO_MESSAGE_PARAMETER_NOT_FOUND: | 155 case QUIC_CRYPTO_MESSAGE_PARAMETER_NOT_FOUND: |
| 155 if (presence_ == PRESENCE_REQUIRED) { | 156 if (presence_ == PRESENCE_REQUIRED) { |
| 156 *error_details = "Missing " + QuicUtils::TagToString(tag_); | 157 *error_details = "Missing " + QuicUtils::TagToString(tag_); |
| 157 break; | 158 break; |
| 158 } | 159 } |
| 159 error = QUIC_NO_ERROR; | 160 error = QUIC_NO_ERROR; |
| 160 *out_length = 1; | 161 *out_length = 1; |
| 161 *out = &default_value_; | 162 *out = &default_value_; |
| 162 | 163 |
| 164 FALLTHROUGH_INTENDED; |
| 163 case QUIC_NO_ERROR: | 165 case QUIC_NO_ERROR: |
| 164 break; | 166 break; |
| 165 default: | 167 default: |
| 166 *error_details = "Bad " + QuicUtils::TagToString(tag_); | 168 *error_details = "Bad " + QuicUtils::TagToString(tag_); |
| 167 break; | 169 break; |
| 168 } | 170 } |
| 169 return error; | 171 return error; |
| 170 } | 172 } |
| 171 | 173 |
| 172 QuicErrorCode QuicNegotiableTag::ProcessClientHello( | 174 QuicErrorCode QuicNegotiableTag::ProcessClientHello( |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 server_hello, error_details); | 406 server_hello, error_details); |
| 405 } | 407 } |
| 406 if (error == QUIC_NO_ERROR) { | 408 if (error == QUIC_NO_ERROR) { |
| 407 error = initial_round_trip_time_us_.ProcessServerHello( | 409 error = initial_round_trip_time_us_.ProcessServerHello( |
| 408 server_hello, error_details); | 410 server_hello, error_details); |
| 409 } | 411 } |
| 410 return error; | 412 return error; |
| 411 } | 413 } |
| 412 | 414 |
| 413 } // namespace net | 415 } // namespace net |
| OLD | NEW |