Chromium Code Reviews| Index: net/quic/quic_http_utils.cc |
| diff --git a/net/quic/quic_http_utils.cc b/net/quic/quic_http_utils.cc |
| index c6dd505f2c64a6ca10cdbf7e2c516f2cf68cdbe6..d05c51a46f6240013930ad2d594425d0ef53ba25 100644 |
| --- a/net/quic/quic_http_utils.cc |
| +++ b/net/quic/quic_http_utils.cc |
| @@ -12,14 +12,15 @@ SpdyPriority ConvertRequestPriorityToQuicPriority( |
| const RequestPriority priority) { |
| DCHECK_GE(priority, MINIMUM_PRIORITY); |
| DCHECK_LE(priority, MAXIMUM_PRIORITY); |
| - return static_cast<SpdyPriority>(HIGHEST - priority); |
| + return static_cast<SpdyPriority>(MAXIMUM_PRIORITY - priority); |
|
mmenke
2016/05/09 19:25:42
Should run this by the SPDY/QUIC teams. There's a
Randy Smith (Not in Mondays)
2016/05/11 21:30:24
Makes sense. Ryan?
(I've also modified this to b
|
| } |
| NET_EXPORT_PRIVATE RequestPriority |
| ConvertQuicPriorityToRequestPriority(SpdyPriority priority) { |
|
mmenke
2016/05/09 19:25:42
The fact that this is not the inverse of ConvertRe
Randy Smith (Not in Mondays)
2016/05/11 21:30:25
I've updated the test. In what ways is this not t
mmenke
2016/05/11 21:56:08
This never returns THROTTLED, does it? I had assu
Randy Smith (Not in Mondays)
2016/05/11 22:04:28
Nope; it was a mistake on my part. I don't see a
mmenke
2016/05/11 22:10:50
Pushed streams with the QUIC/H2 priority correspon
Ryan Hamilton
2016/05/12 22:25:46
I'm not following the pushed stream == throttled c
|
| // Handle invalid values gracefully. |
| - return (priority >= 5) ? IDLE |
| - : static_cast<RequestPriority>(HIGHEST - priority); |
| + return (priority >= (MAXIMUM_PRIORITY - MINIMUM_PRIORITY)) |
|
mmenke
2016/05/09 19:25:42
Hrm...The is right, but weird.
"priority - kV3Hig
Randy Smith (Not in Mondays)
2016/05/11 21:30:24
Fixed here; not sure what you meant by "the same g
mmenke
2016/05/11 21:56:08
Yea, that's what I mean (Weird to do math on prior
|
| + ? IDLE |
| + : static_cast<RequestPriority>(MAXIMUM_PRIORITY - priority); |
| } |
| std::unique_ptr<base::Value> QuicRequestNetLogCallback( |