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

Side by Side Diff: net/quic/core/frames/quic_stream_frame.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, 5 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/BUILD.gn ('k') | net/quic/core/frames/quic_stream_frame.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) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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_CORE_FRAMES_QUIC_STREAM_FRAME_H_ 5 #ifndef NET_QUIC_CORE_FRAMES_QUIC_STREAM_FRAME_H_
6 #define NET_QUIC_CORE_FRAMES_QUIC_STREAM_FRAME_H_ 6 #define NET_QUIC_CORE_FRAMES_QUIC_STREAM_FRAME_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <ostream> 9 #include <ostream>
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 QuicStreamFrame(); 43 QuicStreamFrame();
44 QuicStreamFrame(QuicStreamId stream_id, 44 QuicStreamFrame(QuicStreamId stream_id,
45 bool fin, 45 bool fin,
46 QuicStreamOffset offset, 46 QuicStreamOffset offset,
47 QuicStringPiece data); 47 QuicStringPiece data);
48 QuicStreamFrame(QuicStreamId stream_id, 48 QuicStreamFrame(QuicStreamId stream_id,
49 bool fin, 49 bool fin,
50 QuicStreamOffset offset, 50 QuicStreamOffset offset,
51 QuicPacketLength data_length, 51 QuicPacketLength data_length,
52 UniqueStreamBuffer buffer); 52 UniqueStreamBuffer buffer);
53 QuicStreamFrame(QuicStreamId stream_id,
54 bool fin,
55 QuicStreamOffset offset,
56 QuicPacketLength data_length);
53 ~QuicStreamFrame(); 57 ~QuicStreamFrame();
54 58
55 friend QUIC_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os, 59 friend QUIC_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os,
56 const QuicStreamFrame& s); 60 const QuicStreamFrame& s);
57 61
58 QuicStreamId stream_id; 62 QuicStreamId stream_id;
59 bool fin; 63 bool fin;
60 QuicPacketLength data_length; 64 QuicPacketLength data_length;
61 const char* data_buffer; 65 const char* data_buffer;
62 QuicStreamOffset offset; // Location of this data in the stream. 66 QuicStreamOffset offset; // Location of this data in the stream.
67 // TODO(fayang): When deprecating
68 // FLAGS_quic_reloadable_flag_quic_stream_owns_data: (1) Remove buffer from
69 // QuicStreamFrame; (2) remove the constructor uses UniqueStreamBuffer and (3)
70 // Move definition of UniqueStreamBuffer to QuicStreamSendBuffer.
63 // nullptr when the QuicStreamFrame is received, and non-null when sent. 71 // nullptr when the QuicStreamFrame is received, and non-null when sent.
64 UniqueStreamBuffer buffer; 72 UniqueStreamBuffer buffer;
65 73
66 private: 74 private:
67 QuicStreamFrame(QuicStreamId stream_id, 75 QuicStreamFrame(QuicStreamId stream_id,
68 bool fin, 76 bool fin,
69 QuicStreamOffset offset, 77 QuicStreamOffset offset,
70 const char* data_buffer, 78 const char* data_buffer,
71 QuicPacketLength data_length, 79 QuicPacketLength data_length,
72 UniqueStreamBuffer buffer); 80 UniqueStreamBuffer buffer);
73 81
74 DISALLOW_COPY_AND_ASSIGN(QuicStreamFrame); 82 DISALLOW_COPY_AND_ASSIGN(QuicStreamFrame);
75 }; 83 };
76 static_assert(sizeof(QuicStreamFrame) <= 64, 84 static_assert(sizeof(QuicStreamFrame) <= 64,
77 "Keep the QuicStreamFrame size to a cacheline."); 85 "Keep the QuicStreamFrame size to a cacheline.");
78 86
79 } // namespace net 87 } // namespace net
80 88
81 #endif // NET_QUIC_CORE_FRAMES_QUIC_STREAM_FRAME_H_ 89 #endif // NET_QUIC_CORE_FRAMES_QUIC_STREAM_FRAME_H_
OLDNEW
« no previous file with comments | « net/BUILD.gn ('k') | net/quic/core/frames/quic_stream_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698