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

Unified Diff: net/spdy/spdy_session.cc

Issue 3050016: Implement prefetching in chrome (Closed)
Patch Set: merge to trunk Created 10 years, 5 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_network_transaction_unittest.cc ('k') | net/spdy/spdy_stream_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session.cc
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index 5d6fb0246580b8c7006ba4cc36fed04b6a30c65e..5209089595f0ae7b0a14267815405a6e74c08893 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -225,7 +225,7 @@ net::Error SpdySession::Connect(
const std::string& group_name,
const scoped_refptr<TCPSocketParams>& destination,
RequestPriority priority) {
- DCHECK(priority >= SPDY_PRIORITY_HIGHEST && priority <= SPDY_PRIORITY_LOWEST);
+ DCHECK(priority >= net::HIGHEST && priority < net::NUM_PRIORITIES);
// If the connect process is started, let the caller continue.
if (state_ > IDLE)
@@ -384,8 +384,7 @@ int SpdySession::CreateStreamImpl(
LOG(INFO) << "SpdyStream: Creating stream " << stream_id << " for " << url;
// TODO(mbelshe): Optimize memory allocations
- DCHECK(priority >= SPDY_PRIORITY_HIGHEST &&
- priority <= SPDY_PRIORITY_LOWEST);
+ DCHECK(priority >= net::HIGHEST && priority < net::NUM_PRIORITIES);
DCHECK_EQ(active_streams_[stream_id].get(), stream.get());
return OK;
@@ -403,8 +402,10 @@ int SpdySession::WriteSynStream(
CHECK_EQ(stream->stream_id(), stream_id);
scoped_ptr<spdy::SpdySynStreamControlFrame> syn_frame(
- spdy_framer_.CreateSynStream(stream_id, 0, priority, flags, false,
- headers.get()));
+ spdy_framer_.CreateSynStream(
+ stream_id, 0,
+ ConvertRequestPriorityToSpdyPriority(priority),
+ flags, false, headers.get()));
QueueFrame(syn_frame.get(), priority, stream);
static StatsCounter spdy_requests("spdy.requests");
« no previous file with comments | « net/spdy/spdy_network_transaction_unittest.cc ('k') | net/spdy/spdy_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698