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

Side by Side Diff: net/spdy/spdy_session_pool_unittest.cc

Issue 1298253002: Remove reference counting from HttpNetworkSession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed too much, back up a bit 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/spdy/spdy_session_pool.h" 5 #include "net/spdy/spdy_session_pool.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 26 matching lines...) Expand all
37 spdy_session_pool_(NULL) {} 37 spdy_session_pool_(NULL) {}
38 38
39 void CreateNetworkSession() { 39 void CreateNetworkSession() {
40 http_session_ = SpdySessionDependencies::SpdyCreateSession(&session_deps_); 40 http_session_ = SpdySessionDependencies::SpdyCreateSession(&session_deps_);
41 spdy_session_pool_ = http_session_->spdy_session_pool(); 41 spdy_session_pool_ = http_session_->spdy_session_pool();
42 } 42 }
43 43
44 void RunIPPoolingTest(SpdyPoolCloseSessionsType close_sessions_type); 44 void RunIPPoolingTest(SpdyPoolCloseSessionsType close_sessions_type);
45 45
46 SpdySessionDependencies session_deps_; 46 SpdySessionDependencies session_deps_;
47 scoped_refptr<HttpNetworkSession> http_session_; 47 scoped_ptr<HttpNetworkSession> http_session_;
48 SpdySessionPool* spdy_session_pool_; 48 SpdySessionPool* spdy_session_pool_;
49 }; 49 };
50 50
51 INSTANTIATE_TEST_CASE_P(NextProto, 51 INSTANTIATE_TEST_CASE_P(NextProto,
52 SpdySessionPoolTest, 52 SpdySessionPoolTest,
53 testing::Values(kProtoSPDY31, 53 testing::Values(kProtoSPDY31,
54 kProtoHTTP2)); 54 kProtoHTTP2));
55 55
56 // A delegate that opens a new session when it is closed. 56 // A delegate that opens a new session when it is closed.
57 class SessionOpeningDelegate : public SpdyStream::Delegate { 57 class SessionOpeningDelegate : public SpdyStream::Delegate {
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 EXPECT_TRUE(delegateA.StreamIsClosed()); 613 EXPECT_TRUE(delegateA.StreamIsClosed());
614 EXPECT_EQ(ERR_NETWORK_CHANGED, delegateA.WaitForClose()); 614 EXPECT_EQ(ERR_NETWORK_CHANGED, delegateA.WaitForClose());
615 EXPECT_TRUE(delegateB.StreamIsClosed()); 615 EXPECT_TRUE(delegateB.StreamIsClosed());
616 EXPECT_EQ(ERR_NETWORK_CHANGED, delegateB.WaitForClose()); 616 EXPECT_EQ(ERR_NETWORK_CHANGED, delegateB.WaitForClose());
617 #endif // defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_IOS) 617 #endif // defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_IOS)
618 } 618 }
619 619
620 } // namespace 620 } // namespace
621 621
622 } // namespace net 622 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698