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

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: Missed two comments, fix some tests Created 5 years, 3 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
Index: net/spdy/spdy_session_unittest.cc
diff --git a/net/spdy/spdy_session_unittest.cc b/net/spdy/spdy_session_unittest.cc
index 95a8aeeff9fd299e26a553e0754abf03e115f39c..799d917546237730a9815d62dcc8fdd5c0a1a897 100644
--- a/net/spdy/spdy_session_unittest.cc
+++ b/net/spdy/spdy_session_unittest.cc
@@ -128,8 +128,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() {
@@ -167,7 +167,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_;
@@ -307,7 +307,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_);
@@ -2186,7 +2186,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"));
@@ -2216,7 +2216,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"));
@@ -2958,8 +2958,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.

Powered by Google App Engine
This is Rietveld 408576698