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

Unified Diff: net/websockets/websocket_job.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_write_queue_unittest.cc ('k') | net/websockets/websocket_job_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_job.cc
diff --git a/net/websockets/websocket_job.cc b/net/websockets/websocket_job.cc
index 3d7c11842770c11e6ee9ef9fd9eb1121a4b776f7..50d121837ac72debf61c4af6ed0f6759886a177a 100644
--- a/net/websockets/websocket_job.cc
+++ b/net/websockets/websocket_job.cc
@@ -597,7 +597,7 @@ int WebSocketJob::TrySpdyStream() {
socket_->proxy_server(), privacy_mode);
// Forbid wss downgrade to SPDY without SSL.
// TODO(toyoshim): Does it realize the same policy with HTTP?
- scoped_refptr<SpdySession> spdy_session =
+ base::WeakPtr<SpdySession> spdy_session =
spdy_pool->FindAvailableSession(key, *socket_->net_log());
if (!spdy_session)
return OK;
@@ -612,8 +612,7 @@ int WebSocketJob::TrySpdyStream() {
// Create SpdyWebSocketStream.
spdy_protocol_version_ = spdy_session->GetProtocolVersion();
- spdy_websocket_stream_.reset(
- new SpdyWebSocketStream(spdy_session.get(), this));
+ spdy_websocket_stream_.reset(new SpdyWebSocketStream(spdy_session, this));
int result = spdy_websocket_stream_->InitializeStream(
socket_->url(), MEDIUM, *socket_->net_log());
« no previous file with comments | « net/spdy/spdy_write_queue_unittest.cc ('k') | net/websockets/websocket_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698