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

Unified Diff: net/spdy/spdy_session_unittest.cc

Issue 1298253002: Remove reference counting from HttpNetworkSession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test Created 5 years, 2 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_pool_unittest.cc ('k') | net/spdy/spdy_stream_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session_unittest.cc
diff --git a/net/spdy/spdy_session_unittest.cc b/net/spdy/spdy_session_unittest.cc
index 0f89c4f0c192963c9a85893694777cbd79cd5138..debcb72a62ec94323819d7dae91168362545c1f0 100644
--- a/net/spdy/spdy_session_unittest.cc
+++ b/net/spdy/spdy_session_unittest.cc
@@ -135,8 +135,8 @@ class SpdySessionTest : public PlatformTest,
void CreateInsecureSpdySession() {
DCHECK(!session_);
- session_ =
- ::net::CreateInsecureSpdySession(http_session_, key_, log_.bound());
+ session_ = ::net::CreateInsecureSpdySession(http_session_.get(), key_,
+ log_.bound());
}
void StallSessionSend() {
@@ -174,7 +174,7 @@ class SpdySessionTest : public PlatformTest,
SpdyTestUtil spdy_util_;
SpdySessionDependencies session_deps_;
- scoped_refptr<HttpNetworkSession> http_session_;
+ scoped_ptr<HttpNetworkSession> http_session_;
base::WeakPtr<SpdySession> session_;
SpdySessionPool* spdy_session_pool_;
GURL test_url_;
@@ -314,7 +314,7 @@ TEST_P(SpdySessionTest, GoAwayImmediatelyWithNoActiveStreams) {
CreateNetworkSession();
session_ = TryCreateInsecureSpdySessionExpectingFailure(
- http_session_, key_, ERR_CONNECTION_CLOSED, BoundNetLog());
+ http_session_.get(), key_, ERR_CONNECTION_CLOSED, BoundNetLog());
base::RunLoop().RunUntilIdle();
EXPECT_FALSE(session_);
@@ -2192,7 +2192,7 @@ TEST_P(SpdySessionTest, VerifyDomainAuthentication) {
CreateNetworkSession();
- session_ = CreateSecureSpdySession(http_session_, key_, BoundNetLog());
+ session_ = CreateSecureSpdySession(http_session_.get(), key_, BoundNetLog());
EXPECT_TRUE(session_->VerifyDomainAuthentication("www.example.org"));
EXPECT_TRUE(session_->VerifyDomainAuthentication("mail.example.org"));
@@ -2222,7 +2222,7 @@ TEST_P(SpdySessionTest, ConnectionPooledWithTlsChannelId) {
CreateNetworkSession();
- session_ = CreateSecureSpdySession(http_session_, key_, BoundNetLog());
+ session_ = CreateSecureSpdySession(http_session_.get(), key_, BoundNetLog());
EXPECT_TRUE(session_->VerifyDomainAuthentication("www.example.org"));
EXPECT_TRUE(session_->VerifyDomainAuthentication("mail.example.org"));
@@ -3032,8 +3032,8 @@ TEST_P(SpdySessionTest, CloseOneIdleConnectionWithAlias) {
// Create an idle SPDY session.
SpdySessionKey key1(HostPortPair("1.com", 80), ProxyServer::Direct(),
PRIVACY_MODE_DISABLED);
- base::WeakPtr<SpdySession> session1 =
- ::net::CreateInsecureSpdySession(http_session_, key1, BoundNetLog());
+ base::WeakPtr<SpdySession> session1 = ::net::CreateInsecureSpdySession(
+ http_session_.get(), key1, BoundNetLog());
EXPECT_FALSE(pool->IsStalled());
// Set up an alias for the idle SPDY session, increasing its ref count to 2.
« no previous file with comments | « net/spdy/spdy_session_pool_unittest.cc ('k') | net/spdy/spdy_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698