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

Unified Diff: net/quic/quic_headers_stream.cc

Issue 2018513002: Plumb unmodified HTTP/2 stream weight value through SPDY framing code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/quic/quic_headers_stream_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_headers_stream.cc
diff --git a/net/quic/quic_headers_stream.cc b/net/quic/quic_headers_stream.cc
index 8891463e8786bb8026b997cf120506459ebd8f3c..ef13806e7bf5a0919535c90ea4c1f9c6b3a34db3 100644
--- a/net/quic/quic_headers_stream.cc
+++ b/net/quic/quic_headers_stream.cc
@@ -12,6 +12,7 @@
#include "net/quic/quic_header_list.h"
#include "net/quic/quic_spdy_session.h"
#include "net/quic/quic_time.h"
+#include "net/spdy/spdy_protocol.h"
using base::StringPiece;
using net::HTTP2;
@@ -160,7 +161,7 @@ class QuicHeadersStream::SpdyFramerVisitor
void OnHeaders(SpdyStreamId stream_id,
bool has_priority,
- SpdyPriority priority,
+ int weight,
SpdyStreamId parent_stream_id,
bool exclusive,
bool fin,
@@ -169,6 +170,8 @@ class QuicHeadersStream::SpdyFramerVisitor
return;
}
+ SpdyPriority priority =
+ has_priority ? Http2WeightToSpdy3Priority(weight) : 0;
stream_->OnHeaders(stream_id, has_priority, priority, fin);
}
@@ -268,7 +271,7 @@ size_t QuicHeadersStream::WriteHeaders(QuicStreamId stream_id,
headers_frame.set_fin(fin);
if (session()->perspective() == Perspective::IS_CLIENT) {
headers_frame.set_has_priority(true);
- headers_frame.set_priority(priority);
+ headers_frame.set_weight(Spdy3PriorityToHttp2Weight(priority));
}
SpdySerializedFrame frame(spdy_framer_.SerializeFrame(headers_frame));
WriteOrBufferData(StringPiece(frame.data(), frame.size()), false,
« no previous file with comments | « no previous file | net/quic/quic_headers_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698