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

Side by Side Diff: net/quic/core/quic_session_test.cc

Issue 2226643004: QuicSession no longer directly owns its QuicConnection. Not flag protected. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@129226757
Patch Set: Created 4 years, 4 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
« no previous file with comments | « net/quic/core/quic_session.cc ('k') | net/quic/core/quic_spdy_session.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/quic/core/quic_session.h" 5 #include "net/quic/core/quic_session.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/rand_util.h" 10 #include "base/rand_util.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 class TestSession : public QuicSpdySession { 113 class TestSession : public QuicSpdySession {
114 public: 114 public:
115 explicit TestSession(QuicConnection* connection) 115 explicit TestSession(QuicConnection* connection)
116 : QuicSpdySession(connection, DefaultQuicConfig()), 116 : QuicSpdySession(connection, DefaultQuicConfig()),
117 crypto_stream_(this), 117 crypto_stream_(this),
118 writev_consumes_all_data_(false) { 118 writev_consumes_all_data_(false) {
119 Initialize(); 119 Initialize();
120 } 120 }
121 121
122 ~TestSession() override { delete connection(); }
123
122 TestCryptoStream* GetCryptoStream() override { return &crypto_stream_; } 124 TestCryptoStream* GetCryptoStream() override { return &crypto_stream_; }
123 125
124 TestStream* CreateOutgoingDynamicStream(SpdyPriority priority) override { 126 TestStream* CreateOutgoingDynamicStream(SpdyPriority priority) override {
125 TestStream* stream = new TestStream(GetNextOutgoingStreamId(), this); 127 TestStream* stream = new TestStream(GetNextOutgoingStreamId(), this);
126 stream->SetPriority(priority); 128 stream->SetPriority(priority);
127 ActivateStream(stream); 129 ActivateStream(stream);
128 return stream; 130 return stream;
129 } 131 }
130 132
131 TestStream* CreateIncomingDynamicStream(QuicStreamId id) override { 133 TestStream* CreateIncomingDynamicStream(QuicStreamId id) override {
(...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after
1201 if (version() <= QUIC_VERSION_35) { 1203 if (version() <= QUIC_VERSION_35) {
1202 EXPECT_FALSE(session_.force_hol_blocking()); 1204 EXPECT_FALSE(session_.force_hol_blocking());
1203 } else { 1205 } else {
1204 EXPECT_TRUE(session_.force_hol_blocking()); 1206 EXPECT_TRUE(session_.force_hol_blocking());
1205 } 1207 }
1206 } 1208 }
1207 1209
1208 } // namespace 1210 } // namespace
1209 } // namespace test 1211 } // namespace test
1210 } // namespace net 1212 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_session.cc ('k') | net/quic/core/quic_spdy_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698