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

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

Issue 1979743002: Rename the QUIC stream frame fields frame_buffer and frame_length to data_buffer and data_length be… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@121700577
Patch Set: Created 4 years, 7 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_packet_generator.cc ('k') | net/quic/quic_protocol.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_PROTOCOL_H_ 5 #ifndef NET_QUIC_QUIC_PROTOCOL_H_
6 #define NET_QUIC_QUIC_PROTOCOL_H_ 6 #define NET_QUIC_QUIC_PROTOCOL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 839
840 struct NET_EXPORT_PRIVATE QuicStreamFrame { 840 struct NET_EXPORT_PRIVATE QuicStreamFrame {
841 QuicStreamFrame(); 841 QuicStreamFrame();
842 QuicStreamFrame(QuicStreamId stream_id, 842 QuicStreamFrame(QuicStreamId stream_id,
843 bool fin, 843 bool fin,
844 QuicStreamOffset offset, 844 QuicStreamOffset offset,
845 base::StringPiece data); 845 base::StringPiece data);
846 QuicStreamFrame(QuicStreamId stream_id, 846 QuicStreamFrame(QuicStreamId stream_id,
847 bool fin, 847 bool fin,
848 QuicStreamOffset offset, 848 QuicStreamOffset offset,
849 QuicPacketLength frame_length, 849 QuicPacketLength data_length,
850 UniqueStreamBuffer buffer); 850 UniqueStreamBuffer buffer);
851 ~QuicStreamFrame(); 851 ~QuicStreamFrame();
852 852
853 NET_EXPORT_PRIVATE friend std::ostream& operator<<(std::ostream& os, 853 NET_EXPORT_PRIVATE friend std::ostream& operator<<(std::ostream& os,
854 const QuicStreamFrame& s); 854 const QuicStreamFrame& s);
855 855
856 QuicStreamId stream_id; 856 QuicStreamId stream_id;
857 bool fin; 857 bool fin;
858 QuicPacketLength frame_length; 858 QuicPacketLength data_length;
859 const char* frame_buffer; 859 const char* data_buffer;
860 QuicStreamOffset offset; // Location of this data in the stream. 860 QuicStreamOffset offset; // Location of this data in the stream.
861 // nullptr when the QuicStreamFrame is received, and non-null when sent. 861 // nullptr when the QuicStreamFrame is received, and non-null when sent.
862 UniqueStreamBuffer buffer; 862 UniqueStreamBuffer buffer;
863 863
864 private: 864 private:
865 QuicStreamFrame(QuicStreamId stream_id, 865 QuicStreamFrame(QuicStreamId stream_id,
866 bool fin, 866 bool fin,
867 QuicStreamOffset offset, 867 QuicStreamOffset offset,
868 const char* frame_buffer, 868 const char* data_buffer,
869 QuicPacketLength frame_length, 869 QuicPacketLength data_length,
870 UniqueStreamBuffer buffer); 870 UniqueStreamBuffer buffer);
871 871
872 DISALLOW_COPY_AND_ASSIGN(QuicStreamFrame); 872 DISALLOW_COPY_AND_ASSIGN(QuicStreamFrame);
873 }; 873 };
874 static_assert(sizeof(QuicStreamFrame) <= 64, 874 static_assert(sizeof(QuicStreamFrame) <= 64,
875 "Keep the QuicStreamFrame size to a cacheline."); 875 "Keep the QuicStreamFrame size to a cacheline.");
876 // TODO(ianswett): Re-evaluate the trade-offs of hash_set vs set when framing 876 // TODO(ianswett): Re-evaluate the trade-offs of hash_set vs set when framing
877 // is finalized. 877 // is finalized.
878 typedef std::set<QuicPacketNumber> PacketNumberSet; 878 typedef std::set<QuicPacketNumber> PacketNumberSet;
879 typedef std::list<QuicPacketNumber> PacketNumberList; 879 typedef std::list<QuicPacketNumber> PacketNumberList;
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
1488 : iov(iov), iov_count(iov_count), total_length(total_length) {} 1488 : iov(iov), iov_count(iov_count), total_length(total_length) {}
1489 1489
1490 const struct iovec* iov; 1490 const struct iovec* iov;
1491 const int iov_count; 1491 const int iov_count;
1492 const size_t total_length; 1492 const size_t total_length;
1493 }; 1493 };
1494 1494
1495 } // namespace net 1495 } // namespace net
1496 1496
1497 #endif // NET_QUIC_QUIC_PROTOCOL_H_ 1497 #endif // NET_QUIC_QUIC_PROTOCOL_H_
OLDNEW
« no previous file with comments | « net/quic/quic_packet_generator.cc ('k') | net/quic/quic_protocol.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698