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

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

Issue 242593002: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Build fix. Use uint32 instead of int Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_headers_stream.h ('k') | net/quic/quic_headers_stream_test.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 #include "net/quic/quic_headers_stream.h" 5 #include "net/quic/quic_headers_stream.h"
6 6
7 #include "net/quic/quic_session.h" 7 #include "net/quic/quic_session.h"
8 8
9 using base::StringPiece; 9 using base::StringPiece;
10 10
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 167
168 QuicHeadersStream::QuicHeadersStream(QuicSession* session) 168 QuicHeadersStream::QuicHeadersStream(QuicSession* session)
169 : ReliableQuicStream(kHeadersStreamId, session), 169 : ReliableQuicStream(kHeadersStreamId, session),
170 stream_id_(kInvalidStreamId), 170 stream_id_(kInvalidStreamId),
171 fin_(false), 171 fin_(false),
172 frame_len_(0), 172 frame_len_(0),
173 spdy_framer_(SPDY3), 173 spdy_framer_(SPDY3),
174 spdy_framer_visitor_(new SpdyFramerVisitor(this)) { 174 spdy_framer_visitor_(new SpdyFramerVisitor(this)) {
175 spdy_framer_.set_visitor(spdy_framer_visitor_.get()); 175 spdy_framer_.set_visitor(spdy_framer_visitor_.get());
176 spdy_framer_.set_debug_visitor(spdy_framer_visitor_.get()); 176 spdy_framer_.set_debug_visitor(spdy_framer_visitor_.get());
177 DisableFlowControl();
177 } 178 }
178 179
179 QuicHeadersStream::~QuicHeadersStream() {} 180 QuicHeadersStream::~QuicHeadersStream() {}
180 181
181 size_t QuicHeadersStream::WriteHeaders( 182 size_t QuicHeadersStream::WriteHeaders(
182 QuicStreamId stream_id, 183 QuicStreamId stream_id,
183 const SpdyHeaderBlock& headers, 184 const SpdyHeaderBlock& headers,
184 bool fin, 185 bool fin,
185 QuicAckNotifier::DelegateInterface* ack_notifier_delegate) { 186 QuicAckNotifier::DelegateInterface* ack_notifier_delegate) {
186 scoped_ptr<SpdySerializedFrame> frame; 187 scoped_ptr<SpdySerializedFrame> frame;
(...skipping 13 matching lines...) Expand all
200 return frame->size(); 201 return frame->size();
201 } 202 }
202 203
203 uint32 QuicHeadersStream::ProcessRawData(const char* data, 204 uint32 QuicHeadersStream::ProcessRawData(const char* data,
204 uint32 data_len) { 205 uint32 data_len) {
205 return spdy_framer_.ProcessInput(data, data_len); 206 return spdy_framer_.ProcessInput(data, data_len);
206 } 207 }
207 208
208 QuicPriority QuicHeadersStream::EffectivePriority() const { return 0; } 209 QuicPriority QuicHeadersStream::EffectivePriority() const { return 0; }
209 210
210 bool QuicHeadersStream::IsFlowControlEnabled() const {
211 return false;
212 }
213
214 void QuicHeadersStream::OnSynStream(SpdyStreamId stream_id, 211 void QuicHeadersStream::OnSynStream(SpdyStreamId stream_id,
215 SpdyPriority priority, 212 SpdyPriority priority,
216 bool fin) { 213 bool fin) {
217 if (!session()->is_server()) { 214 if (!session()->is_server()) {
218 CloseConnectionWithDetails( 215 CloseConnectionWithDetails(
219 QUIC_INVALID_HEADERS_STREAM_DATA, 216 QUIC_INVALID_HEADERS_STREAM_DATA,
220 "SPDY SYN_STREAM frame received at the client"); 217 "SPDY SYN_STREAM frame received at the client");
221 return; 218 return;
222 } 219 }
223 DCHECK_EQ(kInvalidStreamId, stream_id_); 220 DCHECK_EQ(kInvalidStreamId, stream_id_);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 DCHECK_EQ(kInvalidStreamId, stream_id_); 256 DCHECK_EQ(kInvalidStreamId, stream_id_);
260 DCHECK_EQ(0u, frame_len_); 257 DCHECK_EQ(0u, frame_len_);
261 frame_len_ = frame_len; 258 frame_len_ = frame_len;
262 } 259 }
263 260
264 bool QuicHeadersStream::IsConnected() { 261 bool QuicHeadersStream::IsConnected() {
265 return session()->connection()->connected(); 262 return session()->connection()->connected();
266 } 263 }
267 264
268 } // namespace net 265 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_headers_stream.h ('k') | net/quic/quic_headers_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698