OLD | NEW |
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_packet_creator.h" | 5 #include "net/quic/core/quic_packet_creator.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cstdint> | 8 #include <cstdint> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "net/quic/core/crypto/crypto_protocol.h" | 12 #include "net/quic/core/crypto/crypto_protocol.h" |
13 #include "net/quic/core/quic_bug_tracker.h" | |
14 #include "net/quic/core/quic_data_writer.h" | 13 #include "net/quic/core/quic_data_writer.h" |
15 #include "net/quic/core/quic_flags.h" | 14 #include "net/quic/core/quic_flags.h" |
16 #include "net/quic/core/quic_utils.h" | 15 #include "net/quic/core/quic_utils.h" |
17 #include "net/quic/platform/api/quic_aligned.h" | 16 #include "net/quic/platform/api/quic_aligned.h" |
| 17 #include "net/quic/platform/api/quic_bug_tracker.h" |
18 | 18 |
19 using base::StringPiece; | 19 using base::StringPiece; |
20 using std::string; | 20 using std::string; |
21 | 21 |
22 // If true, enforce that QUIC CHLOs fit in one packet. | 22 // If true, enforce that QUIC CHLOs fit in one packet. |
23 bool FLAGS_quic_enforce_single_packet_chlo = true; | 23 bool FLAGS_quic_enforce_single_packet_chlo = true; |
24 | 24 |
25 namespace net { | 25 namespace net { |
26 | 26 |
27 QuicPacketCreator::QuicPacketCreator(QuicConnectionId connection_id, | 27 QuicPacketCreator::QuicPacketCreator(QuicConnectionId connection_id, |
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
656 // Switching path needs to update packet number length. | 656 // Switching path needs to update packet number length. |
657 UpdatePacketNumberLength(least_packet_awaited_by_peer, max_packets_in_flight); | 657 UpdatePacketNumberLength(least_packet_awaited_by_peer, max_packets_in_flight); |
658 } | 658 } |
659 | 659 |
660 bool QuicPacketCreator::IncludeNonceInPublicHeader() { | 660 bool QuicPacketCreator::IncludeNonceInPublicHeader() { |
661 return have_diversification_nonce_ && | 661 return have_diversification_nonce_ && |
662 packet_.encryption_level == ENCRYPTION_INITIAL; | 662 packet_.encryption_level == ENCRYPTION_INITIAL; |
663 } | 663 } |
664 | 664 |
665 } // namespace net | 665 } // namespace net |
OLD | NEW |