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

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

Issue 1785513003: Simplify QUIC's encryption path now that FEC is gone. Protected by FLAG_quic_inplace_encryption. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@116261116
Patch Set: Created 4 years, 9 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_flags.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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 QuicDecrypter* decrypter, 300 QuicDecrypter* decrypter,
301 bool latch_once_used); 301 bool latch_once_used);
302 302
303 const QuicDecrypter* decrypter() const; 303 const QuicDecrypter* decrypter() const;
304 const QuicDecrypter* alternative_decrypter() const; 304 const QuicDecrypter* alternative_decrypter() const;
305 305
306 // Changes the encrypter used for level |level| to |encrypter|. The function 306 // Changes the encrypter used for level |level| to |encrypter|. The function
307 // takes ownership of |encrypter|. 307 // takes ownership of |encrypter|.
308 void SetEncrypter(EncryptionLevel level, QuicEncrypter* encrypter); 308 void SetEncrypter(EncryptionLevel level, QuicEncrypter* encrypter);
309 309
310 // Encrypts a payload in |buffer|. |ad_len| is the length of the associated
311 // data. |total_len| is the length of the associated data plus plaintext.
312 // |buffer_len| is the full length of the allocated buffer.
313 size_t EncryptInPlace(EncryptionLevel level,
314 QuicPathId path_id,
315 QuicPacketNumber packet_number,
316 size_t ad_len,
317 size_t total_len,
318 size_t buffer_len,
319 char* buffer);
320
310 // Returns the length of the data encrypted into |buffer| if |buffer_len| is 321 // Returns the length of the data encrypted into |buffer| if |buffer_len| is
311 // long enough, and otherwise 0. 322 // long enough, and otherwise 0.
312 size_t EncryptPayload(EncryptionLevel level, 323 size_t EncryptPayload(EncryptionLevel level,
313 QuicPathId path_id, 324 QuicPathId path_id,
314 QuicPacketNumber packet_number, 325 QuicPacketNumber packet_number,
315 const QuicPacket& packet, 326 const QuicPacket& packet,
316 char* buffer, 327 char* buffer,
317 size_t buffer_len); 328 size_t buffer_len);
318 329
319 // Returns the maximum length of plaintext that can be encrypted 330 // Returns the maximum length of plaintext that can be encrypted
(...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 554 // The time delta computed for the last timestamp frame. This is relative to
544 // the creation_time. 555 // the creation_time.
545 QuicTime::Delta last_timestamp_; 556 QuicTime::Delta last_timestamp_;
546 557
547 DISALLOW_COPY_AND_ASSIGN(QuicFramer); 558 DISALLOW_COPY_AND_ASSIGN(QuicFramer);
548 }; 559 };
549 560
550 } // namespace net 561 } // namespace net
551 562
552 #endif // NET_QUIC_QUIC_FRAMER_H_ 563 #endif // NET_QUIC_QUIC_FRAMER_H_
OLDNEW
« no previous file with comments | « net/quic/quic_flags.cc ('k') | net/quic/quic_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698