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

Unified Diff: net/spdy/spdy_test_util_common.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 | « net/spdy/spdy_test_util_common.h ('k') | net/tools/flip_server/spdy_interface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_test_util_common.cc
diff --git a/net/spdy/spdy_test_util_common.cc b/net/spdy/spdy_test_util_common.cc
index 53434d609983e0ade2643be242dc753d7a838a9f..29d0857981770a8066ebd011fd4fdcac5197b4e0 100644
--- a/net/spdy/spdy_test_util_common.cc
+++ b/net/spdy/spdy_test_util_common.cc
@@ -199,13 +199,13 @@ class PriorityGetter : public BufferedSpdyFramerVisitorInterface {
const SpdyHeaderBlock& headers) override {}
void OnHeaders(SpdyStreamId stream_id,
bool has_priority,
- SpdyPriority priority,
+ int weight,
SpdyStreamId parent_stream_id,
bool exclusive,
bool fin,
const SpdyHeaderBlock& headers) override {
if (has_priority) {
- priority_ = priority;
+ priority_ = Http2WeightToSpdy3Priority(weight);
}
}
void OnDataFrameHeader(SpdyStreamId stream_id,
@@ -771,8 +771,7 @@ SpdySerializedFrame* SpdyTestUtil::ConstructSpdyFrame(
break;
case HEADERS:
frame = framer.CreateHeaders(header_info.id, header_info.control_flags,
- header_info.priority,
- headers.get());
+ header_info.weight, headers.get());
break;
default:
ADD_FAILURE();
@@ -1098,8 +1097,8 @@ SpdySerializedFrame* SpdyTestUtil::ConstructSpdySyn(
SpdyHeadersIR headers(stream_id);
headers.set_header_block(block);
headers.set_has_priority(true);
- headers.set_priority(
- ConvertRequestPriorityToSpdyPriority(priority, spdy_version()));
+ headers.set_weight(Spdy3PriorityToHttp2Weight(
+ ConvertRequestPriorityToSpdyPriority(priority, spdy_version())));
if (dependency_priorities_) {
headers.set_parent_stream_id(parent_stream_id);
headers.set_exclusive(true);
« no previous file with comments | « net/spdy/spdy_test_util_common.h ('k') | net/tools/flip_server/spdy_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698