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

Unified Diff: net/spdy/spdy_session.cc

Issue 15701009: [SPDY] Add a SpdyStreamType enum and use it for SpdyStream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CHECK -> DCHECK Created 7 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
Index: net/spdy/spdy_session.cc
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index 714ce85dac3db5f50fd1cf836521046d2ef8f561..8b6b1eddd931a77856cf7354739dae7c1e2e1f7f 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -238,6 +238,7 @@ SpdyStreamRequest::~SpdyStreamRequest() {
}
int SpdyStreamRequest::StartRequest(
+ SpdyStreamType type,
const scoped_refptr<SpdySession>& session,
const GURL& url,
RequestPriority priority,
@@ -248,6 +249,7 @@ int SpdyStreamRequest::StartRequest(
DCHECK(!stream_);
DCHECK(callback_.is_null());
+ type_ = type;
session_ = session;
url_ = url;
priority_ = priority;
@@ -300,6 +302,7 @@ void SpdyStreamRequest::OnRequestCompleteFailure(int rv) {
}
void SpdyStreamRequest::Reset() {
+ type_ = SPDY_BIDIRECTIONAL_STREAM;
session_ = NULL;
stream_.reset();
url_ = GURL();
@@ -584,10 +587,10 @@ int SpdySession::CreateStream(const SpdyStreamRequest& request,
const std::string& path = request.url().PathForRequest();
scoped_ptr<SpdyStream> new_stream(
- new SpdyStream(this, path, request.priority(),
+ new SpdyStream(request.type(), this, path, request.priority(),
stream_initial_send_window_size_,
stream_initial_recv_window_size_,
- false, request.net_log()));
+ request.net_log()));
*stream = new_stream->GetWeakPtr();
InsertCreatedStream(new_stream.Pass());
@@ -1697,10 +1700,11 @@ void SpdySession::OnSynStream(SpdyStreamId stream_id,
}
scoped_ptr<SpdyStream> stream(
- new SpdyStream(this, gurl.PathForRequest(), request_priority,
+ new SpdyStream(SPDY_PUSH_STREAM, this, gurl.PathForRequest(),
+ request_priority,
stream_initial_send_window_size_,
stream_initial_recv_window_size_,
- true, net_log_));
+ net_log_));
stream->set_stream_id(stream_id);
DeleteExpiredPushedStreams();

Powered by Google App Engine
This is Rietveld 408576698