OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // The base class for streams which deliver data to/from an application. | 5 // The base class for streams which deliver data to/from an application. |
6 // In each direction, the data on such a stream first contains compressed | 6 // In each direction, the data on such a stream first contains compressed |
7 // headers then body data. | 7 // headers then body data. |
8 | 8 |
9 #ifndef NET_QUIC_QUIC_DATA_STREAM_H_ | 9 #ifndef NET_QUIC_QUIC_DATA_STREAM_H_ |
10 #define NET_QUIC_QUIC_DATA_STREAM_H_ | 10 #define NET_QUIC_QUIC_DATA_STREAM_H_ |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 50 |
51 private: | 51 private: |
52 DISALLOW_COPY_AND_ASSIGN(Visitor); | 52 DISALLOW_COPY_AND_ASSIGN(Visitor); |
53 }; | 53 }; |
54 | 54 |
55 QuicDataStream(QuicStreamId id, QuicSession* session); | 55 QuicDataStream(QuicStreamId id, QuicSession* session); |
56 | 56 |
57 virtual ~QuicDataStream(); | 57 virtual ~QuicDataStream(); |
58 | 58 |
59 // ReliableQuicStream implementation | 59 // ReliableQuicStream implementation |
60 virtual void OnClose() OVERRIDE; | 60 virtual void OnClose() override; |
61 virtual uint32 ProcessRawData(const char* data, uint32 data_len) OVERRIDE; | 61 virtual uint32 ProcessRawData(const char* data, uint32 data_len) override; |
62 // By default, this is the same as priority(), however it allows streams | 62 // By default, this is the same as priority(), however it allows streams |
63 // to temporarily alter effective priority. For example if a SPDY stream has | 63 // to temporarily alter effective priority. For example if a SPDY stream has |
64 // compressed but not written headers it can write the headers with a higher | 64 // compressed but not written headers it can write the headers with a higher |
65 // priority. | 65 // priority. |
66 virtual QuicPriority EffectivePriority() const OVERRIDE; | 66 virtual QuicPriority EffectivePriority() const override; |
67 | 67 |
68 // Overridden by subclasses to process data. The headers will be delivered | 68 // Overridden by subclasses to process data. The headers will be delivered |
69 // via OnStreamHeaders, so only data will be delivered through this method. | 69 // via OnStreamHeaders, so only data will be delivered through this method. |
70 virtual uint32 ProcessData(const char* data, uint32 data_len) = 0; | 70 virtual uint32 ProcessData(const char* data, uint32 data_len) = 0; |
71 | 71 |
72 // Called by the session when decompressed headers data is received | 72 // Called by the session when decompressed headers data is received |
73 // for this stream. | 73 // for this stream. |
74 // May be called multiple times, with each call providing additional headers | 74 // May be called multiple times, with each call providing additional headers |
75 // data until OnStreamHeadersComplete is called. | 75 // data until OnStreamHeadersComplete is called. |
76 virtual void OnStreamHeaders(base::StringPiece headers_data); | 76 virtual void OnStreamHeaders(base::StringPiece headers_data); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 bool decompression_failed_; | 138 bool decompression_failed_; |
139 // True if the priority has been read, false otherwise. | 139 // True if the priority has been read, false otherwise. |
140 bool priority_parsed_; | 140 bool priority_parsed_; |
141 | 141 |
142 DISALLOW_COPY_AND_ASSIGN(QuicDataStream); | 142 DISALLOW_COPY_AND_ASSIGN(QuicDataStream); |
143 }; | 143 }; |
144 | 144 |
145 } // namespace net | 145 } // namespace net |
146 | 146 |
147 #endif // NET_QUIC_QUIC_DATA_STREAM_H_ | 147 #endif // NET_QUIC_QUIC_DATA_STREAM_H_ |
OLD | NEW |