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

Side by Side Diff: net/spdy/buffered_spdy_framer.cc

Issue 2596703002: http2: Update priorities of pushed streams (Closed)
Patch Set: actually rebase Created 3 years, 11 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/spdy/buffered_spdy_framer.h ('k') | net/spdy/http2_priority_dependencies.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/spdy/buffered_spdy_framer.h" 5 #include "net/spdy/buffered_spdy_framer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 SpdySerializedFrame* BufferedSpdyFramer::CreatePushPromise( 312 SpdySerializedFrame* BufferedSpdyFramer::CreatePushPromise(
313 SpdyStreamId stream_id, 313 SpdyStreamId stream_id,
314 SpdyStreamId promised_stream_id, 314 SpdyStreamId promised_stream_id,
315 SpdyHeaderBlock headers) { 315 SpdyHeaderBlock headers) {
316 SpdyPushPromiseIR push_promise_ir(stream_id, promised_stream_id, 316 SpdyPushPromiseIR push_promise_ir(stream_id, promised_stream_id,
317 std::move(headers)); 317 std::move(headers));
318 return new SpdySerializedFrame( 318 return new SpdySerializedFrame(
319 spdy_framer_.SerializePushPromise(push_promise_ir)); 319 spdy_framer_.SerializePushPromise(push_promise_ir));
320 } 320 }
321 321
322 // TODO(jgraettinger): Eliminate uses of this method (prefer
323 // SpdyPriorityIR).
324 SpdySerializedFrame* BufferedSpdyFramer::CreatePriority(
325 SpdyStreamId stream_id,
326 SpdyStreamId dependency_id,
327 int weight,
328 bool exclusive) const {
329 SpdyPriorityIR priority_ir(stream_id, dependency_id, weight, exclusive);
330 return new SpdySerializedFrame(spdy_framer_.SerializePriority(priority_ir));
331 }
332
322 SpdyPriority BufferedSpdyFramer::GetHighestPriority() const { 333 SpdyPriority BufferedSpdyFramer::GetHighestPriority() const {
323 return spdy_framer_.GetHighestPriority(); 334 return spdy_framer_.GetHighestPriority();
324 } 335 }
325 336
326 void BufferedSpdyFramer::InitHeaderStreaming(SpdyStreamId stream_id) { 337 void BufferedSpdyFramer::InitHeaderStreaming(SpdyStreamId stream_id) {
327 header_buffer_.clear(); 338 header_buffer_.clear();
328 header_buffer_valid_ = true; 339 header_buffer_valid_ = true;
329 header_stream_id_ = stream_id; 340 header_stream_id_ = stream_id;
330 DCHECK_NE(header_stream_id_, SpdyFramer::kInvalidStream); 341 DCHECK_NE(header_stream_id_, SpdyFramer::kInvalidStream);
331 } 342 }
332 343
333 } // namespace net 344 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/buffered_spdy_framer.h ('k') | net/spdy/http2_priority_dependencies.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698