Chromium Code Reviews| Index: net/spdy/spdy_http_utils.cc |
| diff --git a/net/spdy/spdy_http_utils.cc b/net/spdy/spdy_http_utils.cc |
| index edb8f1b6ed208f6c25bbefc6c43460dc3b73c033..e05c07717cf0d21e2e65f20eae26b39ba99cbc83 100644 |
| --- a/net/spdy/spdy_http_utils.cc |
| +++ b/net/spdy/spdy_http_utils.cc |
| @@ -147,6 +147,16 @@ SpdyPriority ConvertRequestPriorityToSpdyPriority( |
| } |
| } |
| +NET_EXPORT_PRIVATE RequestPriority ConvertSpdyPriorityToRequestPriority( |
| + SpdyPriority priority, |
| + int protocol_version) { |
| + // Handle invalid values gracefully, and pick LOW to map 2 back |
|
Ryan Hamilton
2013/03/24 15:08:40
nit: outdent
akalin
2013/03/24 19:24:53
Done.
|
| + // to for SPDY/2. |
| + SpdyPriority idle_cutoff = (protocol_version == 2) ? 3 : 5; |
| + return (priority >= idle_cutoff) ? |
| + IDLE : static_cast<RequestPriority>(HIGHEST - priority); |
| +} |
| + |
| GURL GetUrlFromHeaderBlock(const SpdyHeaderBlock& headers, |
| int protocol_version, |
| bool pushed) { |