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

Unified Diff: net/spdy/spdy_session.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_session.h ('k') | net/spdy/spdy_session_spdy2_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 c6c38196610dbb2089c0fa74a1b08dfa18a7ba48..21fcd132594801850efd8615595f7b34ced9d4e6 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -556,13 +556,10 @@ int SpdySession::CreateStream(const SpdyStreamRequest& request,
}
const std::string& path = request.url().PathForRequest();
-
- *stream = new SpdyStream(this, false, request.net_log());
-
- (*stream)->set_priority(request.priority());
- (*stream)->set_path(path);
- (*stream)->set_send_window_size(stream_initial_send_window_size_);
- (*stream)->set_recv_window_size(stream_initial_recv_window_size_);
+ *stream = new SpdyStream(this, path, request.priority(),
+ stream_initial_send_window_size_,
+ stream_initial_recv_window_size_,
+ false, request.net_log());
created_streams_.insert(*stream);
UMA_HISTOGRAM_CUSTOM_COUNTS(
@@ -933,7 +930,7 @@ int SpdySession::DoRead() {
return connection_->socket()->Read(
read_buffer_.get(),
kReadBufferSize,
- base::Bind(&SpdySession::OnReadComplete, base::Unretained(this)));
+ base::Bind(&SpdySession::OnReadComplete, weak_factory_.GetWeakPtr()));
}
int SpdySession::DoReadComplete(int result) {
@@ -1079,7 +1076,7 @@ void SpdySession::WriteSocket() {
int rv = connection_->socket()->Write(
in_flight_write_.buffer(),
in_flight_write_.buffer()->BytesRemaining(),
- base::Bind(&SpdySession::OnWriteComplete, base::Unretained(this)));
+ base::Bind(&SpdySession::OnWriteComplete, weak_factory_.GetWeakPtr()));
if (rv == net::ERR_IO_PENDING)
break;
@@ -1554,13 +1551,15 @@ void SpdySession::OnSynStream(SpdyStreamId stream_id,
return;
}
- scoped_refptr<SpdyStream> stream(new SpdyStream(this, true, net_log_));
+ RequestPriority request_priority =
+ ConvertSpdyPriorityToRequestPriority(priority, GetProtocolVersion());
+ scoped_refptr<SpdyStream> stream(
+ new SpdyStream(this, gurl.PathForRequest(), request_priority,
+ stream_initial_send_window_size_,
+ stream_initial_recv_window_size_,
+ true, net_log_));
stream->set_stream_id(stream_id);
- stream->set_path(gurl.PathForRequest());
- stream->set_send_window_size(stream_initial_send_window_size_);
- stream->set_recv_window_size(stream_initial_recv_window_size_);
-
DeleteExpiredPushedStreams();
unclaimed_pushed_streams_[url] =
std::pair<scoped_refptr<SpdyStream>, base::TimeTicks> (
« no previous file with comments | « net/spdy/spdy_session.h ('k') | net/spdy/spdy_session_spdy2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698