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

Side by Side Diff: net/tools/quic/quic_server_session_base_test.cc

Issue 1744103003: QuicSession::CreateIncomingDynamicStream now retains ownership of the created stream. No functional… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/tools/quic/quic_server_session_base.h" 5 #include "net/tools/quic/quic_server_session_base.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "net/quic/crypto/quic_crypto_server_config.h" 8 #include "net/quic/crypto/quic_crypto_server_config.h"
9 #include "net/quic/crypto/quic_random.h" 9 #include "net/quic/crypto/quic_random.h"
10 #include "net/quic/proto/cached_network_parameters.pb.h" 10 #include "net/quic/proto/cached_network_parameters.pb.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 const QuicCryptoServerConfig* crypto_config) 76 const QuicCryptoServerConfig* crypto_config)
77 : QuicServerSessionBase(config, connection, visitor, crypto_config) {} 77 : QuicServerSessionBase(config, connection, visitor, crypto_config) {}
78 78
79 ~TestServerSession() override{}; 79 ~TestServerSession() override{};
80 80
81 protected: 81 protected:
82 QuicSpdyStream* CreateIncomingDynamicStream(QuicStreamId id) override { 82 QuicSpdyStream* CreateIncomingDynamicStream(QuicStreamId id) override {
83 if (!ShouldCreateIncomingDynamicStream(id)) { 83 if (!ShouldCreateIncomingDynamicStream(id)) {
84 return nullptr; 84 return nullptr;
85 } 85 }
86 return new QuicSimpleServerStream(id, this); 86 QuicSpdyStream* stream = new QuicSimpleServerStream(id, this);
87 ActivateStream(stream);
88 return stream;
87 } 89 }
88 90
89 QuicSpdyStream* CreateOutgoingDynamicStream(SpdyPriority priority) override { 91 QuicSpdyStream* CreateOutgoingDynamicStream(SpdyPriority priority) override {
90 if (!ShouldCreateOutgoingDynamicStream()) { 92 if (!ShouldCreateOutgoingDynamicStream()) {
91 return nullptr; 93 return nullptr;
92 } 94 }
93 95
94 QuicSpdyStream* stream = 96 QuicSpdyStream* stream =
95 new QuicSimpleServerStream(GetNextOutgoingStreamId(), this); 97 new QuicSimpleServerStream(GetNextOutgoingStreamId(), this);
96 stream->SetPriority(priority); 98 stream->SetPriority(priority);
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 EXPECT_FALSE( 530 EXPECT_FALSE(
529 QuicServerSessionBasePeer::IsBandwidthResumptionEnabled(session_.get())); 531 QuicServerSessionBasePeer::IsBandwidthResumptionEnabled(session_.get()));
530 session_->OnConfigNegotiated(); 532 session_->OnConfigNegotiated();
531 EXPECT_FALSE( 533 EXPECT_FALSE(
532 QuicServerSessionBasePeer::IsBandwidthResumptionEnabled(session_.get())); 534 QuicServerSessionBasePeer::IsBandwidthResumptionEnabled(session_.get()));
533 } 535 }
534 536
535 } // namespace 537 } // namespace
536 } // namespace test 538 } // namespace test
537 } // namespace net 539 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_client_session_test.cc ('k') | net/tools/quic/quic_simple_server_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698