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

Side by Side Diff: net/quic/core/quic_stream_sequencer_buffer.h

Issue 2561893002: Add QUIC_EXPORT macros (Closed)
Patch Set: More Created 4 years 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
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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_QUIC_STREAM_SEQUENCER_BUFFER_H_ 5 #ifndef NET_QUIC_CORE_QUIC_STREAM_SEQUENCER_BUFFER_H_
6 #define NET_QUIC_CORE_QUIC_STREAM_SEQUENCER_BUFFER_H_ 6 #define NET_QUIC_CORE_QUIC_STREAM_SEQUENCER_BUFFER_H_
7 7
8 // QuicStreamSequencerBuffer implements QuicStreamSequencerBufferInterface. 8 // QuicStreamSequencerBuffer implements QuicStreamSequencerBufferInterface.
9 // It is a circular stream buffer with random write and 9 // It is a circular stream buffer with random write and
10 // in-sequence read. It consists of a vector of pointers pointing 10 // in-sequence read. It consists of a vector of pointers pointing
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // size_t consumed = consume_iovs(iovs, iov_count); 60 // size_t consumed = consume_iovs(iovs, iov_count);
61 // buffer.MarkConsumed(consumed); 61 // buffer.MarkConsumed(consumed);
62 62
63 #include <stddef.h> 63 #include <stddef.h>
64 64
65 #include <functional> 65 #include <functional>
66 #include <list> 66 #include <list>
67 #include <memory> 67 #include <memory>
68 68
69 #include "base/macros.h" 69 #include "base/macros.h"
70 #include "net/base/net_export.h"
71 #include "net/quic/core/quic_packets.h" 70 #include "net/quic/core/quic_packets.h"
71 #include "net/quic/platform/api/quic_export.h"
72 72
73 namespace net { 73 namespace net {
74 74
75 namespace test { 75 namespace test {
76 class QuicStreamSequencerBufferPeer; 76 class QuicStreamSequencerBufferPeer;
77 } // namespace test 77 } // namespace test
78 78
79 class NET_EXPORT_PRIVATE QuicStreamSequencerBuffer { 79 class QUIC_EXPORT_PRIVATE QuicStreamSequencerBuffer {
80 public: 80 public:
81 // A Gap indicates a missing chunk of bytes between 81 // A Gap indicates a missing chunk of bytes between
82 // [begin_offset, end_offset) in the stream 82 // [begin_offset, end_offset) in the stream
83 struct NET_EXPORT_PRIVATE Gap { 83 struct QUIC_EXPORT_PRIVATE Gap {
84 Gap(QuicStreamOffset begin_offset, QuicStreamOffset end_offset); 84 Gap(QuicStreamOffset begin_offset, QuicStreamOffset end_offset);
85 QuicStreamOffset begin_offset; 85 QuicStreamOffset begin_offset;
86 QuicStreamOffset end_offset; 86 QuicStreamOffset end_offset;
87 }; 87 };
88 88
89 // A FrameInfo stores the length of a frame and the time it arrived. 89 // A FrameInfo stores the length of a frame and the time it arrived.
90 struct NET_EXPORT_PRIVATE FrameInfo { 90 struct QUIC_EXPORT_PRIVATE FrameInfo {
91 FrameInfo(); 91 FrameInfo();
92 FrameInfo(size_t length, QuicTime timestamp); 92 FrameInfo(size_t length, QuicTime timestamp);
93 93
94 size_t length; 94 size_t length;
95 QuicTime timestamp; 95 QuicTime timestamp;
96 }; 96 };
97 97
98 // Size of blocks used by this buffer. 98 // Size of blocks used by this buffer.
99 // Choose 8K to make block large enough to hold multiple frames, each of 99 // Choose 8K to make block large enough to hold multiple frames, each of
100 // which could be up to 1.5 KB. 100 // which could be up to 1.5 KB.
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 // For debugging use after free, assigned to 123456 in constructor and 654321 251 // For debugging use after free, assigned to 123456 in constructor and 654321
252 // in destructor. As long as it's not 123456, this means either use after free 252 // in destructor. As long as it's not 123456, this means either use after free
253 // or memory corruption. 253 // or memory corruption.
254 int32_t destruction_indicator_; 254 int32_t destruction_indicator_;
255 255
256 DISALLOW_COPY_AND_ASSIGN(QuicStreamSequencerBuffer); 256 DISALLOW_COPY_AND_ASSIGN(QuicStreamSequencerBuffer);
257 }; 257 };
258 } // namespace net 258 } // namespace net
259 259
260 #endif // NET_QUIC_CORE_QUIC_STREAM_SEQUENCER_BUFFER_H_ 260 #endif // NET_QUIC_CORE_QUIC_STREAM_SEQUENCER_BUFFER_H_
OLDNEW
« no previous file with comments | « net/quic/core/quic_stream_sequencer.h ('k') | net/quic/core/quic_stream_sequencer_buffer_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698