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

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

Issue 1190823003: Remove dependency on headers stream from QuicSession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0616
Patch Set: deleted an include Created 5 years, 6 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_data_stream_test.cc ('k') | net/quic/quic_headers_stream.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 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 #ifndef NET_QUIC_QUIC_HEADERS_STREAM_H_ 5 #ifndef NET_QUIC_QUIC_HEADERS_STREAM_H_
6 #define NET_QUIC_QUIC_HEADERS_STREAM_H_ 6 #define NET_QUIC_QUIC_HEADERS_STREAM_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "net/base/net_export.h" 10 #include "net/base/net_export.h"
11 #include "net/quic/quic_protocol.h" 11 #include "net/quic/quic_protocol.h"
12 #include "net/quic/reliable_quic_stream.h" 12 #include "net/quic/reliable_quic_stream.h"
13 #include "net/spdy/spdy_framer.h" 13 #include "net/spdy/spdy_framer.h"
14 14
15 namespace net { 15 namespace net {
16 16
17 class QuicSpdySession;
18
17 // Headers in QUIC are sent as SPDY SYN_STREAM or SYN_REPLY frames 19 // Headers in QUIC are sent as SPDY SYN_STREAM or SYN_REPLY frames
18 // over a reserved reliable stream with the id 2. Each endpoint (client 20 // over a reserved reliable stream with the id 2. Each endpoint (client
19 // and server) will allocate an instance of QuicHeadersStream to send 21 // and server) will allocate an instance of QuicHeadersStream to send
20 // and receive headers. 22 // and receive headers.
21 class NET_EXPORT_PRIVATE QuicHeadersStream : public ReliableQuicStream { 23 class NET_EXPORT_PRIVATE QuicHeadersStream : public ReliableQuicStream {
22 public: 24 public:
23 explicit QuicHeadersStream(QuicSession* session); 25 explicit QuicHeadersStream(QuicSpdySession* session);
24 ~QuicHeadersStream() override; 26 ~QuicHeadersStream() override;
25 27
26 // Writes |headers| for |stream_id| in a SYN_STREAM or SYN_REPLY 28 // Writes |headers| for |stream_id| in a SYN_STREAM or SYN_REPLY
27 // frame to the peer. If |fin| is true, the fin flag will be set on 29 // frame to the peer. If |fin| is true, the fin flag will be set on
28 // the SPDY frame. Returns the size, in bytes, of the resulting 30 // the SPDY frame. Returns the size, in bytes, of the resulting
29 // SPDY frame. 31 // SPDY frame.
30 size_t WriteHeaders( 32 size_t WriteHeaders(
31 QuicStreamId stream_id, 33 QuicStreamId stream_id,
32 const SpdyHeaderBlock& headers, 34 const SpdyHeaderBlock& headers,
33 bool fin, 35 bool fin,
(...skipping 26 matching lines...) Expand all
60 void OnControlFrameHeaderData(SpdyStreamId stream_id, 62 void OnControlFrameHeaderData(SpdyStreamId stream_id,
61 const char* header_data, 63 const char* header_data,
62 size_t len); 64 size_t len);
63 65
64 // Called when the size of the compressed frame payload is available. 66 // Called when the size of the compressed frame payload is available.
65 void OnCompressedFrameSize(size_t frame_len); 67 void OnCompressedFrameSize(size_t frame_len);
66 68
67 // Returns true if the session is still connected. 69 // Returns true if the session is still connected.
68 bool IsConnected(); 70 bool IsConnected();
69 71
72 QuicSpdySession* spdy_session_;
73
70 // Data about the stream whose headers are being processed. 74 // Data about the stream whose headers are being processed.
71 QuicStreamId stream_id_; 75 QuicStreamId stream_id_;
72 bool fin_; 76 bool fin_;
73 size_t frame_len_; 77 size_t frame_len_;
74 78
75 SpdyFramer spdy_framer_; 79 SpdyFramer spdy_framer_;
76 scoped_ptr<SpdyFramerVisitor> spdy_framer_visitor_; 80 scoped_ptr<SpdyFramerVisitor> spdy_framer_visitor_;
77 81
78 DISALLOW_COPY_AND_ASSIGN(QuicHeadersStream); 82 DISALLOW_COPY_AND_ASSIGN(QuicHeadersStream);
79 }; 83 };
80 84
81 } // namespace net 85 } // namespace net
82 86
83 #endif // NET_QUIC_QUIC_HEADERS_STREAM_H_ 87 #endif // NET_QUIC_QUIC_HEADERS_STREAM_H_
OLDNEW
« no previous file with comments | « net/quic/quic_data_stream_test.cc ('k') | net/quic/quic_headers_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698