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

Unified Diff: net/spdy/spdy_websocket_stream.cc

Issue 18546008: [SPDY] Use WeakPtr<SpdySession> everywhere but SpdySessionPool (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test, other minor formatting/comment changes Created 7 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_websocket_stream.h ('k') | net/spdy/spdy_websocket_stream_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_websocket_stream.cc
diff --git a/net/spdy/spdy_websocket_stream.cc b/net/spdy/spdy_websocket_stream.cc
index 3a3022af90cbf14a8da1d652420119f988fa54d6..c0eac28b6fb4e64f0462d76b2e7c50c62eb9c251 100644
--- a/net/spdy/spdy_websocket_stream.cc
+++ b/net/spdy/spdy_websocket_stream.cc
@@ -18,7 +18,7 @@
namespace net {
SpdyWebSocketStream::SpdyWebSocketStream(
- SpdySession* spdy_session, Delegate* delegate)
+ const base::WeakPtr<SpdySession>& spdy_session, Delegate* delegate)
: weak_ptr_factory_(this),
spdy_session_(spdy_session),
pending_send_data_length_(0),
@@ -35,7 +35,7 @@ SpdyWebSocketStream::~SpdyWebSocketStream() {
int SpdyWebSocketStream::InitializeStream(const GURL& url,
RequestPriority request_priority,
const BoundNetLog& net_log) {
- if (spdy_session_->IsClosed())
+ if (!spdy_session_)
return ERR_SOCKET_NOT_CONNECTED;
int rv = stream_request_.StartRequest(
« no previous file with comments | « net/spdy/spdy_websocket_stream.h ('k') | net/spdy/spdy_websocket_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698