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

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

Issue 1433703005: Pass in connection ID and supported version to QuicFramer::BuildVersionNegotiationPacket, instead … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@106947577
Patch Set: Created 5 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/quic_connection_test.cc ('k') | net/quic/quic_framer.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_FRAMER_H_ 5 #ifndef NET_QUIC_QUIC_FRAMER_H_
6 #define NET_QUIC_QUIC_FRAMER_H_ 6 #define NET_QUIC_QUIC_FRAMER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 // Returns a QuicPacket* that is owned by the caller, and is populated with 297 // Returns a QuicPacket* that is owned by the caller, and is populated with
298 // the fields in |header| and |fec|. Returns nullptr if the packet could 298 // the fields in |header| and |fec|. Returns nullptr if the packet could
299 // not be created. 299 // not be created.
300 QuicPacket* BuildFecPacket(const QuicPacketHeader& header, 300 QuicPacket* BuildFecPacket(const QuicPacketHeader& header,
301 base::StringPiece redundancy); 301 base::StringPiece redundancy);
302 302
303 // Returns a new public reset packet, owned by the caller. 303 // Returns a new public reset packet, owned by the caller.
304 static QuicEncryptedPacket* BuildPublicResetPacket( 304 static QuicEncryptedPacket* BuildPublicResetPacket(
305 const QuicPublicResetPacket& packet); 305 const QuicPublicResetPacket& packet);
306 306
307 QuicEncryptedPacket* BuildVersionNegotiationPacket( 307 // Returns a new version negotiation packet, owned by the caller.
308 const QuicPacketPublicHeader& header, 308 static QuicEncryptedPacket* BuildVersionNegotiationPacket(
309 const QuicVersionVector& supported_versions); 309 QuicConnectionId connection_id,
310 const QuicVersionVector& versions);
310 311
311 // SetDecrypter sets the primary decrypter, replacing any that already exists, 312 // SetDecrypter sets the primary decrypter, replacing any that already exists,
312 // and takes ownership. If an alternative decrypter is in place then the 313 // and takes ownership. If an alternative decrypter is in place then the
313 // function DCHECKs. This is intended for cases where one knows that future 314 // function DCHECKs. This is intended for cases where one knows that future
314 // packets will be using the new decrypter and the previous decrypter is now 315 // packets will be using the new decrypter and the previous decrypter is now
315 // obsolete. |level| indicates the encryption level of the new decrypter. 316 // obsolete. |level| indicates the encryption level of the new decrypter.
316 void SetDecrypter(EncryptionLevel level, QuicDecrypter* decrypter); 317 void SetDecrypter(EncryptionLevel level, QuicDecrypter* decrypter);
317 318
318 // SetAlternativeDecrypter sets a decrypter that may be used to decrypt 319 // SetAlternativeDecrypter sets a decrypter that may be used to decrypt
319 // future packets and takes ownership of it. |level| indicates the encryption 320 // future packets and takes ownership of it. |level| indicates the encryption
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 // The time delta computed for the last timestamp frame. This is relative to 544 // The time delta computed for the last timestamp frame. This is relative to
544 // the creation_time. 545 // the creation_time.
545 QuicTime::Delta last_timestamp_; 546 QuicTime::Delta last_timestamp_;
546 547
547 DISALLOW_COPY_AND_ASSIGN(QuicFramer); 548 DISALLOW_COPY_AND_ASSIGN(QuicFramer);
548 }; 549 };
549 550
550 } // namespace net 551 } // namespace net
551 552
552 #endif // NET_QUIC_QUIC_FRAMER_H_ 553 #endif // NET_QUIC_QUIC_FRAMER_H_
OLDNEW
« no previous file with comments | « net/quic/quic_connection_test.cc ('k') | net/quic/quic_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698