| 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/quic/core/quic_server_session_base.h" | 5 #include "net/quic/core/quic_server_session_base.h" |
| 6 | 6 |
| 7 #include <cstdint> | 7 #include <cstdint> |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 return s->bandwidth_resumption_enabled_; | 70 return s->bandwidth_resumption_enabled_; |
| 71 } | 71 } |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 namespace { | 74 namespace { |
| 75 | 75 |
| 76 class TestServerSession : public QuicServerSessionBase { | 76 class TestServerSession : public QuicServerSessionBase { |
| 77 public: | 77 public: |
| 78 TestServerSession(const QuicConfig& config, | 78 TestServerSession(const QuicConfig& config, |
| 79 QuicConnection* connection, | 79 QuicConnection* connection, |
| 80 QuicServerSessionBase::Visitor* visitor, | 80 QuicSession::Visitor* visitor, |
| 81 QuicCryptoServerStream::Helper* helper, | 81 QuicCryptoServerStream::Helper* helper, |
| 82 const QuicCryptoServerConfig* crypto_config, | 82 const QuicCryptoServerConfig* crypto_config, |
| 83 QuicCompressedCertsCache* compressed_certs_cache) | 83 QuicCompressedCertsCache* compressed_certs_cache) |
| 84 : QuicServerSessionBase(config, | 84 : QuicServerSessionBase(config, |
| 85 connection, | 85 connection, |
| 86 visitor, | 86 visitor, |
| 87 helper, | 87 helper, |
| 88 crypto_config, | 88 crypto_config, |
| 89 compressed_certs_cache) {} | 89 compressed_certs_cache) {} |
| 90 | 90 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 &stream_helper_, &crypto_config_, | 150 &stream_helper_, &crypto_config_, |
| 151 &compressed_certs_cache_)); | 151 &compressed_certs_cache_)); |
| 152 MockClock clock; | 152 MockClock clock; |
| 153 handshake_message_.reset(crypto_config_.AddDefaultConfig( | 153 handshake_message_.reset(crypto_config_.AddDefaultConfig( |
| 154 QuicRandom::GetInstance(), &clock, | 154 QuicRandom::GetInstance(), &clock, |
| 155 QuicCryptoServerConfig::ConfigOptions())); | 155 QuicCryptoServerConfig::ConfigOptions())); |
| 156 session_->Initialize(); | 156 session_->Initialize(); |
| 157 visitor_ = QuicConnectionPeer::GetVisitor(connection_); | 157 visitor_ = QuicConnectionPeer::GetVisitor(connection_); |
| 158 } | 158 } |
| 159 | 159 |
| 160 StrictMock<MockQuicServerSessionVisitor> owner_; | 160 StrictMock<MockQuicSessionVisitor> owner_; |
| 161 StrictMock<MockQuicCryptoServerStreamHelper> stream_helper_; | 161 StrictMock<MockQuicCryptoServerStreamHelper> stream_helper_; |
| 162 MockQuicConnectionHelper helper_; | 162 MockQuicConnectionHelper helper_; |
| 163 MockAlarmFactory alarm_factory_; | 163 MockAlarmFactory alarm_factory_; |
| 164 StrictMock<MockQuicConnection>* connection_; | 164 StrictMock<MockQuicConnection>* connection_; |
| 165 QuicConfig config_; | 165 QuicConfig config_; |
| 166 QuicCryptoServerConfig crypto_config_; | 166 QuicCryptoServerConfig crypto_config_; |
| 167 QuicCompressedCertsCache compressed_certs_cache_; | 167 QuicCompressedCertsCache compressed_certs_cache_; |
| 168 std::unique_ptr<TestServerSession> session_; | 168 std::unique_ptr<TestServerSession> session_; |
| 169 std::unique_ptr<CryptoHandshakeMessage> handshake_message_; | 169 std::unique_ptr<CryptoHandshakeMessage> handshake_message_; |
| 170 QuicConnectionVisitorInterface* visitor_; | 170 QuicConnectionVisitorInterface* visitor_; |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 | 646 |
| 647 // Allow the async ProofSource::GetProof call to complete. Verify (under | 647 // Allow the async ProofSource::GetProof call to complete. Verify (under |
| 648 // asan) that this does not result in accesses to any freed memory from the | 648 // asan) that this does not result in accesses to any freed memory from the |
| 649 // session or its subobjects. | 649 // session or its subobjects. |
| 650 GetFakeProofSource()->InvokePendingCallback(0); | 650 GetFakeProofSource()->InvokePendingCallback(0); |
| 651 } | 651 } |
| 652 | 652 |
| 653 } // namespace | 653 } // namespace |
| 654 } // namespace test | 654 } // namespace test |
| 655 } // namespace net | 655 } // namespace net |
| OLD | NEW |