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

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

Issue 2442833003: [Merge to 2881 for release cherry-picking] Re-enable the QUIC v33 hacks. protected by FLAGS_quic_re… (Closed)
Patch Set: Created 4 years, 1 month 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 #include <vector> 9 #include <vector>
10 10
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 switch (header.public_header.connection_id_length) { 716 switch (header.public_header.connection_id_length) {
717 case PACKET_0BYTE_CONNECTION_ID: 717 case PACKET_0BYTE_CONNECTION_ID:
718 if (!writer->WriteUInt8(public_flags | 718 if (!writer->WriteUInt8(public_flags |
719 PACKET_PUBLIC_FLAGS_0BYTE_CONNECTION_ID)) { 719 PACKET_PUBLIC_FLAGS_0BYTE_CONNECTION_ID)) {
720 return false; 720 return false;
721 } 721 }
722 break; 722 break;
723 case PACKET_8BYTE_CONNECTION_ID: 723 case PACKET_8BYTE_CONNECTION_ID:
724 if (quic_version_ > QUIC_VERSION_32) { 724 if (quic_version_ > QUIC_VERSION_32) {
725 public_flags |= PACKET_PUBLIC_FLAGS_8BYTE_CONNECTION_ID; 725 public_flags |= PACKET_PUBLIC_FLAGS_8BYTE_CONNECTION_ID;
726 if (!FLAGS_quic_remove_v33_hacks2 &&
727 perspective_ == Perspective::IS_CLIENT) {
728 public_flags |= PACKET_PUBLIC_FLAGS_8BYTE_CONNECTION_ID_OLD;
729 }
730
726 } else { 731 } else {
727 public_flags |= PACKET_PUBLIC_FLAGS_8BYTE_CONNECTION_ID_OLD; 732 public_flags |= PACKET_PUBLIC_FLAGS_8BYTE_CONNECTION_ID_OLD;
728 } 733 }
729 if (!writer->WriteUInt8(public_flags) || 734 if (!writer->WriteUInt8(public_flags) ||
730 !writer->WriteUInt64(header.public_header.connection_id)) { 735 !writer->WriteUInt64(header.public_header.connection_id)) {
731 return false; 736 return false;
732 } 737 }
733 break; 738 break;
734 } 739 }
735 last_serialized_connection_id_ = header.public_header.connection_id; 740 last_serialized_connection_id_ = header.public_header.connection_id;
(...skipping 1900 matching lines...) Expand 10 before | Expand all | Expand 10 after
2636 2641
2637 bool QuicFramer::RaiseError(QuicErrorCode error) { 2642 bool QuicFramer::RaiseError(QuicErrorCode error) {
2638 DVLOG(1) << "Error: " << QuicUtils::ErrorToString(error) 2643 DVLOG(1) << "Error: " << QuicUtils::ErrorToString(error)
2639 << " detail: " << detailed_error_; 2644 << " detail: " << detailed_error_;
2640 set_error(error); 2645 set_error(error);
2641 visitor_->OnError(this); 2646 visitor_->OnError(this);
2642 return false; 2647 return false;
2643 } 2648 }
2644 2649
2645 } // namespace net 2650 } // 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