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

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

Issue 1468773002: Changing from QuicPriority to SpdyPriority. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@107610692
Patch Set: Created 5 years, 1 month 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_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 "base/metrics/histogram_macros.h" 7 #include "base/metrics/histogram_macros.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "net/quic/quic_flags.h" 9 #include "net/quic/quic_flags.h"
10 #include "net/quic/quic_headers_stream.h" 10 #include "net/quic/quic_headers_stream.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 // The headers stream is exempt from connection level flow control. 201 // The headers stream is exempt from connection level flow control.
202 DisableConnectionFlowControlForThisStream(); 202 DisableConnectionFlowControlForThisStream();
203 } 203 }
204 204
205 QuicHeadersStream::~QuicHeadersStream() {} 205 QuicHeadersStream::~QuicHeadersStream() {}
206 206
207 size_t QuicHeadersStream::WriteHeaders( 207 size_t QuicHeadersStream::WriteHeaders(
208 QuicStreamId stream_id, 208 QuicStreamId stream_id,
209 const SpdyHeaderBlock& headers, 209 const SpdyHeaderBlock& headers,
210 bool fin, 210 bool fin,
211 QuicPriority priority, 211 SpdyPriority priority,
212 QuicAckListenerInterface* ack_notifier_delegate) { 212 QuicAckListenerInterface* ack_notifier_delegate) {
213 SpdyHeadersIR headers_frame(stream_id); 213 SpdyHeadersIR headers_frame(stream_id);
214 headers_frame.set_header_block(headers); 214 headers_frame.set_header_block(headers);
215 headers_frame.set_fin(fin); 215 headers_frame.set_fin(fin);
216 if (session()->perspective() == Perspective::IS_CLIENT) { 216 if (session()->perspective() == Perspective::IS_CLIENT) {
217 headers_frame.set_has_priority(true); 217 headers_frame.set_has_priority(true);
218 headers_frame.set_priority(priority); 218 headers_frame.set_priority(priority);
219 } 219 }
220 scoped_ptr<SpdySerializedFrame> frame( 220 scoped_ptr<SpdySerializedFrame> frame(
221 spdy_framer_.SerializeFrame(headers_frame)); 221 spdy_framer_.SerializeFrame(headers_frame));
(...skipping 24 matching lines...) Expand all
246 } 246 }
247 if (spdy_framer_.ProcessInput(static_cast<char*>(iov.iov_base), 247 if (spdy_framer_.ProcessInput(static_cast<char*>(iov.iov_base),
248 iov.iov_len) != iov.iov_len) { 248 iov.iov_len) != iov.iov_len) {
249 // Error processing data. 249 // Error processing data.
250 return; 250 return;
251 } 251 }
252 sequencer()->MarkConsumed(iov.iov_len); 252 sequencer()->MarkConsumed(iov.iov_len);
253 } 253 }
254 } 254 }
255 255
256 QuicPriority QuicHeadersStream::Priority() const { 256 SpdyPriority QuicHeadersStream::Priority() const {
257 return QuicWriteBlockedList::kHighestPriority; 257 return net::kHighestPriority; // The smallest priority is also the highest
258 } 258 }
259 259
260 void QuicHeadersStream::OnSynStream(SpdyStreamId stream_id, 260 void QuicHeadersStream::OnSynStream(SpdyStreamId stream_id,
261 SpdyPriority priority, 261 SpdyPriority priority,
262 bool fin) { 262 bool fin) {
263 if (session()->perspective() == Perspective::IS_CLIENT) { 263 if (session()->perspective() == Perspective::IS_CLIENT) {
264 CloseConnectionWithDetails( 264 CloseConnectionWithDetails(
265 QUIC_INVALID_HEADERS_STREAM_DATA, 265 QUIC_INVALID_HEADERS_STREAM_DATA,
266 "SPDY SYN_STREAM frame received at the client"); 266 "SPDY SYN_STREAM frame received at the client");
267 return; 267 return;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 318
319 void QuicHeadersStream::OnCompressedFrameSize(size_t frame_len) { 319 void QuicHeadersStream::OnCompressedFrameSize(size_t frame_len) {
320 frame_len_ += frame_len; 320 frame_len_ += frame_len;
321 } 321 }
322 322
323 bool QuicHeadersStream::IsConnected() { 323 bool QuicHeadersStream::IsConnected() {
324 return session()->connection()->connected(); 324 return session()->connection()->connected();
325 } 325 }
326 326
327 } // namespace net 327 } // 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