| 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.h" | 5 #include "net/tools/quic/quic_server_session.h" |
| 6 | 6 |
| 7 #include "net/quic/crypto/cached_network_parameters.h" |
| 7 #include "net/quic/crypto/quic_crypto_server_config.h" | 8 #include "net/quic/crypto/quic_crypto_server_config.h" |
| 8 #include "net/quic/crypto/quic_random.h" | 9 #include "net/quic/crypto/quic_random.h" |
| 9 #include "net/quic/crypto/source_address_token.h" | |
| 10 #include "net/quic/quic_connection.h" | 10 #include "net/quic/quic_connection.h" |
| 11 #include "net/quic/quic_crypto_server_stream.h" | 11 #include "net/quic/quic_crypto_server_stream.h" |
| 12 #include "net/quic/quic_flags.h" | 12 #include "net/quic/quic_flags.h" |
| 13 #include "net/quic/quic_utils.h" | 13 #include "net/quic/quic_utils.h" |
| 14 #include "net/quic/test_tools/quic_config_peer.h" | 14 #include "net/quic/test_tools/quic_config_peer.h" |
| 15 #include "net/quic/test_tools/quic_connection_peer.h" | 15 #include "net/quic/test_tools/quic_connection_peer.h" |
| 16 #include "net/quic/test_tools/quic_data_stream_peer.h" | 16 #include "net/quic/test_tools/quic_data_stream_peer.h" |
| 17 #include "net/quic/test_tools/quic_sent_packet_manager_peer.h" | 17 #include "net/quic/test_tools/quic_sent_packet_manager_peer.h" |
| 18 #include "net/quic/test_tools/quic_session_peer.h" | 18 #include "net/quic/test_tools/quic_session_peer.h" |
| 19 #include "net/quic/test_tools/quic_sustained_bandwidth_recorder_peer.h" | 19 #include "net/quic/test_tools/quic_sustained_bandwidth_recorder_peer.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 kMaxStreamsForTest); | 72 kMaxStreamsForTest); |
| 73 config_.SetInitialFlowControlWindowToSend( | 73 config_.SetInitialFlowControlWindowToSend( |
| 74 kInitialSessionFlowControlWindowForTest); | 74 kInitialSessionFlowControlWindowForTest); |
| 75 config_.SetInitialStreamFlowControlWindowToSend( | 75 config_.SetInitialStreamFlowControlWindowToSend( |
| 76 kInitialStreamFlowControlWindowForTest); | 76 kInitialStreamFlowControlWindowForTest); |
| 77 config_.SetInitialSessionFlowControlWindowToSend( | 77 config_.SetInitialSessionFlowControlWindowToSend( |
| 78 kInitialSessionFlowControlWindowForTest); | 78 kInitialSessionFlowControlWindowForTest); |
| 79 | 79 |
| 80 connection_ = | 80 connection_ = |
| 81 new StrictMock<MockConnection>(true, SupportedVersions(GetParam())); | 81 new StrictMock<MockConnection>(true, SupportedVersions(GetParam())); |
| 82 session_.reset(new QuicServerSession(config_, connection_, &owner_, | 82 session_.reset(new QuicServerSession(config_, connection_, &owner_)); |
| 83 /*is_secure=*/false)); | |
| 84 MockClock clock; | 83 MockClock clock; |
| 85 handshake_message_.reset(crypto_config_.AddDefaultConfig( | 84 handshake_message_.reset(crypto_config_.AddDefaultConfig( |
| 86 QuicRandom::GetInstance(), &clock, | 85 QuicRandom::GetInstance(), &clock, |
| 87 QuicCryptoServerConfig::ConfigOptions())); | 86 QuicCryptoServerConfig::ConfigOptions())); |
| 88 session_->InitializeSession(crypto_config_); | 87 session_->InitializeSession(crypto_config_); |
| 89 visitor_ = QuicConnectionPeer::GetVisitor(connection_); | 88 visitor_ = QuicConnectionPeer::GetVisitor(connection_); |
| 90 } | 89 } |
| 91 | 90 |
| 92 QuicVersion version() const { return connection_->version(); } | 91 QuicVersion version() const { return connection_->version(); } |
| 93 | 92 |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 EXPECT_CALL(*crypto_stream, | 380 EXPECT_CALL(*crypto_stream, |
| 382 SendServerConfigUpdate(EqualsProto(expected_network_params))) | 381 SendServerConfigUpdate(EqualsProto(expected_network_params))) |
| 383 .Times(1); | 382 .Times(1); |
| 384 session_->OnCongestionWindowChange(now); | 383 session_->OnCongestionWindowChange(now); |
| 385 } | 384 } |
| 386 | 385 |
| 387 } // namespace | 386 } // namespace |
| 388 } // namespace test | 387 } // namespace test |
| 389 } // namespace tools | 388 } // namespace tools |
| 390 } // namespace net | 389 } // namespace net |
| OLD | NEW |