Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(674)

Side by Side Diff: net/quic/core/quic_framer.cc

Issue 2846003002: Deprecate FLAGS_quic_reloadable_flag_quic_remove_packet_number_from_public_reset. (Closed)
Patch Set: remove the deprecated flag Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/core/quic_flags_list.h ('k') | net/quic/core/quic_framer_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_framer.h" 5 #include "net/quic/core/quic_framer.h"
6 6
7 #include <cstdint> 7 #include <cstdint>
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 } 404 }
405 405
406 // static 406 // static
407 std::unique_ptr<QuicEncryptedPacket> QuicFramer::BuildPublicResetPacket( 407 std::unique_ptr<QuicEncryptedPacket> QuicFramer::BuildPublicResetPacket(
408 const QuicPublicResetPacket& packet) { 408 const QuicPublicResetPacket& packet) {
409 DCHECK(packet.public_header.reset_flag); 409 DCHECK(packet.public_header.reset_flag);
410 410
411 CryptoHandshakeMessage reset; 411 CryptoHandshakeMessage reset;
412 reset.set_tag(kPRST); 412 reset.set_tag(kPRST);
413 reset.SetValue(kRNON, packet.nonce_proof); 413 reset.SetValue(kRNON, packet.nonce_proof);
414 if (!FLAGS_quic_reloadable_flag_quic_remove_packet_number_from_public_reset) {
415 reset.SetValue(kRSEQ, packet.rejected_packet_number);
416 }
417 if (packet.client_address.host().address_family() != 414 if (packet.client_address.host().address_family() !=
418 IpAddressFamily::IP_UNSPEC) { 415 IpAddressFamily::IP_UNSPEC) {
419 // packet.client_address is non-empty. 416 // packet.client_address is non-empty.
420 QuicSocketAddressCoder address_coder(packet.client_address); 417 QuicSocketAddressCoder address_coder(packet.client_address);
421 string serialized_address = address_coder.Encode(); 418 string serialized_address = address_coder.Encode();
422 if (serialized_address.empty()) { 419 if (serialized_address.empty()) {
423 return nullptr; 420 return nullptr;
424 } 421 }
425 reset.SetStringPiece(kCADR, serialized_address); 422 reset.SetStringPiece(kCADR, serialized_address);
426 } 423 }
(...skipping 1731 matching lines...) Expand 10 before | Expand all | Expand 10 after
2158 2155
2159 bool QuicFramer::RaiseError(QuicErrorCode error) { 2156 bool QuicFramer::RaiseError(QuicErrorCode error) {
2160 QUIC_DLOG(INFO) << ENDPOINT << "Error: " << QuicErrorCodeToString(error) 2157 QUIC_DLOG(INFO) << ENDPOINT << "Error: " << QuicErrorCodeToString(error)
2161 << " detail: " << detailed_error_; 2158 << " detail: " << detailed_error_;
2162 set_error(error); 2159 set_error(error);
2163 visitor_->OnError(this); 2160 visitor_->OnError(this);
2164 return false; 2161 return false;
2165 } 2162 }
2166 2163
2167 } // namespace net 2164 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_flags_list.h ('k') | net/quic/core/quic_framer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698