| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |