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/quic_crypto_server_config.h" | 7 #include "net/quic/crypto/quic_crypto_server_config.h" |
8 #include "net/quic/crypto/quic_random.h" | 8 #include "net/quic/crypto/quic_random.h" |
9 #include "net/quic/proto/cached_network_parameters.pb.h" | 9 #include "net/quic/proto/cached_network_parameters.pb.h" |
10 #include "net/quic/quic_connection.h" | 10 #include "net/quic/quic_connection.h" |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 QuicSentPacketManagerPeer::GetRttStats(sent_packet_manager); | 361 QuicSentPacketManagerPeer::GetRttStats(sent_packet_manager); |
362 rtt_stats->UpdateRtt(QuicTime::Delta::FromMicroseconds( | 362 rtt_stats->UpdateRtt(QuicTime::Delta::FromMicroseconds( |
363 rtt_stats->initial_rtt_us()), QuicTime::Delta::Zero(), QuicTime::Zero()); | 363 rtt_stats->initial_rtt_us()), QuicTime::Delta::Zero(), QuicTime::Zero()); |
364 QuicSustainedBandwidthRecorderPeer::SetBandwidthEstimate( | 364 QuicSustainedBandwidthRecorderPeer::SetBandwidthEstimate( |
365 &bandwidth_recorder, bandwidth_estimate_kbytes_per_second); | 365 &bandwidth_recorder, bandwidth_estimate_kbytes_per_second); |
366 QuicSustainedBandwidthRecorderPeer::SetMaxBandwidthEstimate( | 366 QuicSustainedBandwidthRecorderPeer::SetMaxBandwidthEstimate( |
367 &bandwidth_recorder, max_bandwidth_estimate_kbytes_per_second, | 367 &bandwidth_recorder, max_bandwidth_estimate_kbytes_per_second, |
368 max_bandwidth_estimate_timestamp); | 368 max_bandwidth_estimate_timestamp); |
369 // Queue up some pending data. | 369 // Queue up some pending data. |
370 session_->MarkConnectionLevelWriteBlocked( | 370 session_->MarkConnectionLevelWriteBlocked( |
371 kCryptoStreamId, QuicWriteBlockedList::kHighestPriority); | 371 kCryptoStreamId, net::kHighestPriority); |
372 EXPECT_TRUE(session_->HasDataToWrite()); | 372 EXPECT_TRUE(session_->HasDataToWrite()); |
373 | 373 |
374 // There will be no update sent yet - not enough time has passed. | 374 // There will be no update sent yet - not enough time has passed. |
375 QuicTime now = QuicTime::Zero(); | 375 QuicTime now = QuicTime::Zero(); |
376 session_->OnCongestionWindowChange(now); | 376 session_->OnCongestionWindowChange(now); |
377 | 377 |
378 // Bandwidth estimate has now changed sufficiently but not enough time has | 378 // Bandwidth estimate has now changed sufficiently but not enough time has |
379 // passed to send a Server Config Update. | 379 // passed to send a Server Config Update. |
380 bandwidth_estimate_kbytes_per_second = | 380 bandwidth_estimate_kbytes_per_second = |
381 bandwidth_estimate_kbytes_per_second * 1.6; | 381 bandwidth_estimate_kbytes_per_second * 1.6; |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 QuicServerSessionPeer::IsBandwidthResumptionEnabled(session_.get())); | 492 QuicServerSessionPeer::IsBandwidthResumptionEnabled(session_.get())); |
493 session_->OnConfigNegotiated(); | 493 session_->OnConfigNegotiated(); |
494 EXPECT_FALSE( | 494 EXPECT_FALSE( |
495 QuicServerSessionPeer::IsBandwidthResumptionEnabled(session_.get())); | 495 QuicServerSessionPeer::IsBandwidthResumptionEnabled(session_.get())); |
496 } | 496 } |
497 | 497 |
498 } // namespace | 498 } // namespace |
499 } // namespace test | 499 } // namespace test |
500 } // namespace tools | 500 } // namespace tools |
501 } // namespace net | 501 } // namespace net |
OLD | NEW |