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

Side by Side Diff: net/quic/quic_protocol.h

Issue 467263003: Change to optimize QUIC's RetransmittableFrames::HasCryptoHandshake by (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add_Update_method_to_QuicAlarm_73125905
Patch Set: Created 6 years, 4 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/quic_packet_creator.cc ('k') | net/quic/quic_protocol.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 #ifndef NET_QUIC_QUIC_PROTOCOL_H_ 5 #ifndef NET_QUIC_QUIC_PROTOCOL_H_
6 #define NET_QUIC_QUIC_PROTOCOL_H_ 6 #define NET_QUIC_QUIC_PROTOCOL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <limits> 9 #include <limits>
10 #include <map> 10 #include <map>
(...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after
992 ~RetransmittableFrames(); 992 ~RetransmittableFrames();
993 993
994 // Allocates a local copy of the referenced StringPiece has QuicStreamFrame 994 // Allocates a local copy of the referenced StringPiece has QuicStreamFrame
995 // use it. 995 // use it.
996 // Takes ownership of |stream_frame|. 996 // Takes ownership of |stream_frame|.
997 const QuicFrame& AddStreamFrame(QuicStreamFrame* stream_frame); 997 const QuicFrame& AddStreamFrame(QuicStreamFrame* stream_frame);
998 // Takes ownership of the frame inside |frame|. 998 // Takes ownership of the frame inside |frame|.
999 const QuicFrame& AddNonStreamFrame(const QuicFrame& frame); 999 const QuicFrame& AddNonStreamFrame(const QuicFrame& frame);
1000 const QuicFrames& frames() const { return frames_; } 1000 const QuicFrames& frames() const { return frames_; }
1001 1001
1002 IsHandshake HasCryptoHandshake() const; 1002 IsHandshake HasCryptoHandshake() const {
1003 return has_crypto_handshake_;
1004 }
1003 1005
1004 void set_encryption_level(EncryptionLevel level); 1006 void set_encryption_level(EncryptionLevel level);
1005 EncryptionLevel encryption_level() const { 1007 EncryptionLevel encryption_level() const {
1006 return encryption_level_; 1008 return encryption_level_;
1007 } 1009 }
1008 1010
1009 private: 1011 private:
1010 QuicFrames frames_; 1012 QuicFrames frames_;
1011 EncryptionLevel encryption_level_; 1013 EncryptionLevel encryption_level_;
1014 IsHandshake has_crypto_handshake_;
1012 // Data referenced by the StringPiece of a QuicStreamFrame. 1015 // Data referenced by the StringPiece of a QuicStreamFrame.
1013 std::vector<std::string*> stream_data_; 1016 std::vector<std::string*> stream_data_;
1014 1017
1015 DISALLOW_COPY_AND_ASSIGN(RetransmittableFrames); 1018 DISALLOW_COPY_AND_ASSIGN(RetransmittableFrames);
1016 }; 1019 };
1017 1020
1018 struct NET_EXPORT_PRIVATE SerializedPacket { 1021 struct NET_EXPORT_PRIVATE SerializedPacket {
1019 SerializedPacket(QuicPacketSequenceNumber sequence_number, 1022 SerializedPacket(QuicPacketSequenceNumber sequence_number,
1020 QuicSequenceNumberLength sequence_number_length, 1023 QuicSequenceNumberLength sequence_number_length,
1021 QuicPacket* packet, 1024 QuicPacket* packet,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
1063 // Stores the sequence numbers of all transmissions of this packet. 1066 // Stores the sequence numbers of all transmissions of this packet.
1064 // Can never be null. 1067 // Can never be null.
1065 SequenceNumberSet* all_transmissions; 1068 SequenceNumberSet* all_transmissions;
1066 // In flight packets have not been abandoned or lost. 1069 // In flight packets have not been abandoned or lost.
1067 bool in_flight; 1070 bool in_flight;
1068 }; 1071 };
1069 1072
1070 } // namespace net 1073 } // namespace net
1071 1074
1072 #endif // NET_QUIC_QUIC_PROTOCOL_H_ 1075 #endif // NET_QUIC_QUIC_PROTOCOL_H_
OLDNEW
« no previous file with comments | « net/quic/quic_packet_creator.cc ('k') | net/quic/quic_protocol.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698