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

Unified Diff: net/spdy/spdy_test_util_common.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_test_util_common.h ('k') | net/spdy/spdy_websocket_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_test_util_common.cc
diff --git a/net/spdy/spdy_test_util_common.cc b/net/spdy/spdy_test_util_common.cc
index ef603fbf2ec1db7e7fa92e4fd3e0961fb1fd46d7..2881844a79ae2200b348d86127101cd47d6f2860 100644
--- a/net/spdy/spdy_test_util_common.cc
+++ b/net/spdy/spdy_test_util_common.cc
@@ -269,7 +269,7 @@ bool GetSpdyPriority(SpdyMajorVersion version,
base::WeakPtr<SpdyStream> CreateStreamSynchronously(
SpdyStreamType type,
- const scoped_refptr<SpdySession>& session,
+ const base::WeakPtr<SpdySession>& session,
const GURL& url,
RequestPriority priority,
const BoundNetLog& net_log) {
@@ -489,7 +489,7 @@ bool HasSpdySession(SpdySessionPool* pool, const SpdySessionKey& key) {
namespace {
-scoped_refptr<SpdySession> CreateSpdySessionHelper(
+base::WeakPtr<SpdySession> CreateSpdySessionHelper(
const scoped_refptr<HttpNetworkSession>& http_session,
const SpdySessionKey& key,
const BoundNetLog& net_log,
@@ -543,7 +543,7 @@ scoped_refptr<SpdySession> CreateSpdySessionHelper(
EXPECT_EQ(OK, rv);
- scoped_refptr<SpdySession> spdy_session;
+ base::WeakPtr<SpdySession> spdy_session;
EXPECT_EQ(
expected_status,
http_session->spdy_session_pool()->CreateAvailableSessionFromSocket(
@@ -557,7 +557,7 @@ scoped_refptr<SpdySession> CreateSpdySessionHelper(
} // namespace
-scoped_refptr<SpdySession> CreateInsecureSpdySession(
+base::WeakPtr<SpdySession> CreateInsecureSpdySession(
const scoped_refptr<HttpNetworkSession>& http_session,
const SpdySessionKey& key,
const BoundNetLog& net_log) {
@@ -575,7 +575,7 @@ void TryCreateInsecureSpdySessionExpectingFailure(
expected_error, false /* is_secure */);
}
-scoped_refptr<SpdySession> CreateSecureSpdySession(
+base::WeakPtr<SpdySession> CreateSecureSpdySession(
const scoped_refptr<HttpNetworkSession>& http_session,
const SpdySessionKey& key,
const BoundNetLog& net_log) {
@@ -640,13 +640,13 @@ class FakeSpdySessionClientSocket : public MockClientSocket {
int read_result_;
};
-scoped_refptr<SpdySession> CreateFakeSpdySessionHelper(
+base::WeakPtr<SpdySession> CreateFakeSpdySessionHelper(
SpdySessionPool* pool,
const SpdySessionKey& key,
Error expected_status) {
EXPECT_NE(expected_status, ERR_IO_PENDING);
EXPECT_FALSE(HasSpdySession(pool, key));
- scoped_refptr<SpdySession> spdy_session;
+ base::WeakPtr<SpdySession> spdy_session;
scoped_ptr<ClientSocketHandle> handle(new ClientSocketHandle());
handle->set_socket(new FakeSpdySessionClientSocket(
expected_status == OK ? ERR_IO_PENDING : expected_status));
@@ -662,7 +662,7 @@ scoped_refptr<SpdySession> CreateFakeSpdySessionHelper(
} // namespace
-scoped_refptr<SpdySession> CreateFakeSpdySession(SpdySessionPool* pool,
+base::WeakPtr<SpdySession> CreateFakeSpdySession(SpdySessionPool* pool,
const SpdySessionKey& key) {
return CreateFakeSpdySessionHelper(pool, key, OK);
}
« no previous file with comments | « net/spdy/spdy_test_util_common.h ('k') | net/spdy/spdy_websocket_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698