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

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

Issue 1421853006: Landing Recent QUIC changes until: Fri Oct 30 22:23:58 2015 +0000 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comments 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_flow_controller_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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 QuicDecrypter* decrypter, 325 QuicDecrypter* decrypter,
326 bool latch_once_used); 326 bool latch_once_used);
327 327
328 const QuicDecrypter* decrypter() const; 328 const QuicDecrypter* decrypter() const;
329 const QuicDecrypter* alternative_decrypter() const; 329 const QuicDecrypter* alternative_decrypter() const;
330 330
331 // Changes the encrypter used for level |level| to |encrypter|. The function 331 // Changes the encrypter used for level |level| to |encrypter|. The function
332 // takes ownership of |encrypter|. 332 // takes ownership of |encrypter|.
333 void SetEncrypter(EncryptionLevel level, QuicEncrypter* encrypter); 333 void SetEncrypter(EncryptionLevel level, QuicEncrypter* encrypter);
334 334
335 // Returns a new encrypted packet, owned by the caller. 335 // Returns the length of the data encrypted into |buffer| if |buffer_len| is
336 // Encrypts into |buffer| if |buffer_len| is long enough, and otherwise 336 // long enough, and otherwise 0.
337 // constructs a new buffer owned by the EncryptedPacket. 337 size_t EncryptPayload(EncryptionLevel level,
338 QuicEncryptedPacket* EncryptPayload(EncryptionLevel level, 338 QuicPacketNumber packet_number,
339 QuicPacketNumber packet_number, 339 const QuicPacket& packet,
340 const QuicPacket& packet, 340 char* buffer,
341 char* buffer, 341 size_t buffer_len);
342 size_t buffer_len);
343 342
344 // Returns the maximum length of plaintext that can be encrypted 343 // Returns the maximum length of plaintext that can be encrypted
345 // to ciphertext no larger than |ciphertext_size|. 344 // to ciphertext no larger than |ciphertext_size|.
346 size_t GetMaxPlaintextSize(size_t ciphertext_size); 345 size_t GetMaxPlaintextSize(size_t ciphertext_size);
347 346
348 const std::string& detailed_error() { return detailed_error_; } 347 const std::string& detailed_error() { return detailed_error_; }
349 348
350 // The minimum packet number length required to represent |packet_number|. 349 // The minimum packet number length required to represent |packet_number|.
351 static QuicPacketNumberLength GetMinSequenceNumberLength( 350 static QuicPacketNumberLength GetMinSequenceNumberLength(
352 QuicPacketNumber packet_number); 351 QuicPacketNumber packet_number);
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 // The time delta computed for the last timestamp frame. This is relative to 543 // The time delta computed for the last timestamp frame. This is relative to
545 // the creation_time. 544 // the creation_time.
546 QuicTime::Delta last_timestamp_; 545 QuicTime::Delta last_timestamp_;
547 546
548 DISALLOW_COPY_AND_ASSIGN(QuicFramer); 547 DISALLOW_COPY_AND_ASSIGN(QuicFramer);
549 }; 548 };
550 549
551 } // namespace net 550 } // namespace net
552 551
553 #endif // NET_QUIC_QUIC_FRAMER_H_ 552 #endif // NET_QUIC_QUIC_FRAMER_H_
OLDNEW
« no previous file with comments | « net/quic/quic_flow_controller_test.cc ('k') | net/quic/quic_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698