| OLD | NEW |
| 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_SPDY_SESSION_H_ | 5 #ifndef NET_QUIC_CORE_QUIC_SPDY_SESSION_H_ |
| 6 #define NET_QUIC_CORE_QUIC_SPDY_SESSION_H_ | 6 #define NET_QUIC_CORE_QUIC_SPDY_SESSION_H_ |
| 7 | 7 |
| 8 #include <cstddef> | 8 #include <cstddef> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "net/quic/core/quic_header_list.h" | 12 #include "net/quic/core/quic_header_list.h" |
| 13 #include "net/quic/core/quic_headers_stream.h" | 13 #include "net/quic/core/quic_headers_stream.h" |
| 14 #include "net/quic/core/quic_session.h" | 14 #include "net/quic/core/quic_session.h" |
| 15 #include "net/quic/core/quic_spdy_stream.h" | 15 #include "net/quic/core/quic_spdy_stream.h" |
| 16 #include "net/quic/platform/api/quic_export.h" | 16 #include "net/quic/platform/api/quic_export.h" |
| 17 #include "net/quic/platform/api/quic_string_piece.h" |
| 17 | 18 |
| 18 namespace net { | 19 namespace net { |
| 19 | 20 |
| 20 namespace test { | 21 namespace test { |
| 21 class QuicSpdySessionPeer; | 22 class QuicSpdySessionPeer; |
| 22 } // namespace test | 23 } // namespace test |
| 23 | 24 |
| 24 // QuicHpackDebugVisitor gathers data used for understanding HPACK HoL | 25 // QuicHpackDebugVisitor gathers data used for understanding HPACK HoL |
| 25 // dynamics. Specifically, it is to help predict the compression | 26 // dynamics. Specifically, it is to help predict the compression |
| 26 // penalty of avoiding HoL by chagning how the dynamic table is used. | 27 // penalty of avoiding HoL by chagning how the dynamic table is used. |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 | 229 |
| 229 // For force HOL blocking, where stream frames from all streams are | 230 // For force HOL blocking, where stream frames from all streams are |
| 230 // plumbed through headers stream as HTTP/2 data frames. | 231 // plumbed through headers stream as HTTP/2 data frames. |
| 231 // The following two return false if force_hol_blocking_ is false. | 232 // The following two return false if force_hol_blocking_ is false. |
| 232 bool OnDataFrameHeader(QuicStreamId stream_id, size_t length, bool fin); | 233 bool OnDataFrameHeader(QuicStreamId stream_id, size_t length, bool fin); |
| 233 bool OnStreamFrameData(QuicStreamId stream_id, const char* data, size_t len); | 234 bool OnStreamFrameData(QuicStreamId stream_id, const char* data, size_t len); |
| 234 | 235 |
| 235 // Helper for |WritevStreamData()|. | 236 // Helper for |WritevStreamData()|. |
| 236 void WriteDataFrame( | 237 void WriteDataFrame( |
| 237 QuicStreamId stream_id, | 238 QuicStreamId stream_id, |
| 238 base::StringPiece data, | 239 QuicStringPiece data, |
| 239 bool fin, | 240 bool fin, |
| 240 QuicReferenceCountedPointer<QuicAckListenerInterface> ack_listener); | 241 QuicReferenceCountedPointer<QuicAckListenerInterface> ack_listener); |
| 241 | 242 |
| 242 // This was formerly QuicHeadersStream::WriteHeaders. Needs to be | 243 // This was formerly QuicHeadersStream::WriteHeaders. Needs to be |
| 243 // separate from QuicSpdySession::WriteHeaders because tests call | 244 // separate from QuicSpdySession::WriteHeaders because tests call |
| 244 // this but mock the latter. | 245 // this but mock the latter. |
| 245 size_t WriteHeadersImpl( | 246 size_t WriteHeadersImpl( |
| 246 QuicStreamId id, | 247 QuicStreamId id, |
| 247 SpdyHeaderBlock headers, | 248 SpdyHeaderBlock headers, |
| 248 bool fin, | 249 bool fin, |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 | 281 |
| 281 SpdyFramer spdy_framer_; | 282 SpdyFramer spdy_framer_; |
| 282 std::unique_ptr<SpdyFramerVisitor> spdy_framer_visitor_; | 283 std::unique_ptr<SpdyFramerVisitor> spdy_framer_visitor_; |
| 283 | 284 |
| 284 DISALLOW_COPY_AND_ASSIGN(QuicSpdySession); | 285 DISALLOW_COPY_AND_ASSIGN(QuicSpdySession); |
| 285 }; | 286 }; |
| 286 | 287 |
| 287 } // namespace net | 288 } // namespace net |
| 288 | 289 |
| 289 #endif // NET_QUIC_CORE_QUIC_SPDY_SESSION_H_ | 290 #endif // NET_QUIC_CORE_QUIC_SPDY_SESSION_H_ |
| OLD | NEW |