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

Unified Diff: net/quic/quic_protocol.cc

Issue 23464033: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix valgrind error Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_protocol.h ('k') | net/quic/quic_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_protocol.cc
diff --git a/net/quic/quic_protocol.cc b/net/quic/quic_protocol.cc
index 313454217d07f022a57b0a8afdd7ae52cdea8a79..cbd4cad639a8462906802517c306267a5a91d51c 100644
--- a/net/quic/quic_protocol.cc
+++ b/net/quic/quic_protocol.cc
@@ -102,7 +102,8 @@ QuicStreamFrame::QuicStreamFrame(QuicStreamId stream_id,
: stream_id(stream_id),
fin(fin),
offset(offset),
- data(data) {
+ data(data),
+ notifier(NULL) {
}
uint32 MakeQuicTag(char a, char b, char c, char d) {
@@ -126,6 +127,8 @@ QuicTag QuicVersionToQuicTag(const QuicVersion version) {
return MakeQuicTag('Q', '0', '0', '8');
case QUIC_VERSION_9:
return MakeQuicTag('Q', '0', '0', '9');
+ case QUIC_VERSION_10:
+ return MakeQuicTag('Q', '0', '1', '0');
default:
// This shold be an ERROR because we should never attempt to convert an
// invalid QuicVersion to be written to the wire.
@@ -138,6 +141,7 @@ QuicVersion QuicTagToQuicVersion(const QuicTag version_tag) {
const QuicTag quic_tag_v7 = MakeQuicTag('Q', '0', '0', '7');
const QuicTag quic_tag_v8 = MakeQuicTag('Q', '0', '0', '8');
const QuicTag quic_tag_v9 = MakeQuicTag('Q', '0', '0', '9');
+ const QuicTag quic_tag_v10 = MakeQuicTag('Q', '0', '1', '0');
if (version_tag == quic_tag_v7) {
return QUIC_VERSION_7;
@@ -145,6 +149,8 @@ QuicVersion QuicTagToQuicVersion(const QuicTag version_tag) {
return QUIC_VERSION_8;
} else if (version_tag == quic_tag_v9) {
return QUIC_VERSION_9;
+ } else if (version_tag == quic_tag_v10) {
+ return QUIC_VERSION_10;
} else {
// Reading from the client so this should not be considered an ERROR.
DLOG(INFO) << "Unsupported QuicTag version: "
@@ -162,6 +168,7 @@ string QuicVersionToString(const QuicVersion version) {
RETURN_STRING_LITERAL(QUIC_VERSION_7);
RETURN_STRING_LITERAL(QUIC_VERSION_8);
RETURN_STRING_LITERAL(QUIC_VERSION_9);
+ RETURN_STRING_LITERAL(QUIC_VERSION_10);
default:
return "QUIC_VERSION_UNSUPPORTED";
}
@@ -414,6 +421,21 @@ void RetransmittableFrames::set_encryption_level(EncryptionLevel level) {
encryption_level_ = level;
}
+SerializedPacket::SerializedPacket(
+ QuicPacketSequenceNumber sequence_number,
+ QuicSequenceNumberLength sequence_number_length,
+ QuicPacket* packet,
+ QuicPacketEntropyHash entropy_hash,
+ RetransmittableFrames* retransmittable_frames)
+ : sequence_number(sequence_number),
+ sequence_number_length(sequence_number_length),
+ packet(packet),
+ entropy_hash(entropy_hash),
+ retransmittable_frames(retransmittable_frames) {
+}
+
+SerializedPacket::~SerializedPacket() {}
+
ostream& operator<<(ostream& os, const QuicEncryptedPacket& s) {
os << s.length() << "-byte data";
return os;
« no previous file with comments | « net/quic/quic_protocol.h ('k') | net/quic/quic_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698