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

Unified Diff: net/quic/core/quic_packet_creator.h

Issue 2963763003: In QUIC, send data is copied to streams rather than frames. Protected by FLAGS_quic_reloadable_flag… (Closed)
Patch Set: Rebase Created 3 years, 6 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/core/quic_headers_stream_test.cc ('k') | net/quic/core/quic_packet_creator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_packet_creator.h
diff --git a/net/quic/core/quic_packet_creator.h b/net/quic/core/quic_packet_creator.h
index 57c16156e11ac2a4d337aba20fac68593c0359e0..667c659d530d65cbf738a8c61e25227a3103c766 100644
--- a/net/quic/core/quic_packet_creator.h
+++ b/net/quic/core/quic_packet_creator.h
@@ -21,6 +21,7 @@
#include "net/quic/core/quic_iovector.h"
#include "net/quic/core/quic_packets.h"
#include "net/quic/core/quic_pending_retransmission.h"
+#include "net/quic/core/quic_stream_frame_data_producer.h"
#include "net/quic/platform/api/quic_export.h"
namespace net {
@@ -32,7 +33,8 @@ class QUIC_EXPORT_PRIVATE QuicPacketCreator {
public:
// A delegate interface for further processing serialized packet.
class QUIC_EXPORT_PRIVATE DelegateInterface
- : public QuicConnectionCloseDelegateInterface {
+ : public QuicConnectionCloseDelegateInterface,
+ public QuicStreamFrameDataProducer {
public:
~DelegateInterface() override {}
// Called when a packet is serialized. Delegate does not take the ownership
@@ -216,6 +218,10 @@ class QUIC_EXPORT_PRIVATE QuicPacketCreator {
QuicByteCount pending_padding_bytes() const { return pending_padding_bytes_; }
+ void set_delegate_saves_data(bool delegate_saves_data) {
+ delegate_saves_data_ = delegate_saves_data;
+ }
+
private:
friend class test::QuicPacketCreatorPeer;
@@ -261,6 +267,11 @@ class QUIC_EXPORT_PRIVATE QuicPacketCreator {
// packet's public header.
bool IncludeNonceInPublicHeader();
+ // Returns true if |frame| starts with CHLO.
+ bool StreamFrameStartsWithChlo(QuicIOVector iov,
+ size_t iov_offset,
+ const QuicStreamFrame& frame) const;
+
// Does not own these delegates or the framer.
DelegateInterface* delegate_;
DebugDelegate* debug_delegate_;
@@ -310,6 +321,10 @@ class QUIC_EXPORT_PRIVATE QuicPacketCreator {
// bytes.
bool needs_full_padding_;
+ // Indicates whether frame data is saved by delegate_. TODO(fayang): Remove
+ // this boolean when deprecating quic_reloadable_flag_quic_stream_owns_data.
+ bool delegate_saves_data_;
+
DISALLOW_COPY_AND_ASSIGN(QuicPacketCreator);
};
« no previous file with comments | « net/quic/core/quic_headers_stream_test.cc ('k') | net/quic/core/quic_packet_creator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698