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

Unified Diff: net/spdy/spdy_http_utils.cc

Issue 12989038: [SPDY] Remove some setters in SpdyStream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed DISALLOW_COPY_AND_ASSIGN again Created 7 years, 9 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_http_utils.h ('k') | net/spdy/spdy_http_utils_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..41647c1729fc26c920374e564de118c34c59c007 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
+ // 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) {
« no previous file with comments | « net/spdy/spdy_http_utils.h ('k') | net/spdy/spdy_http_utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698