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

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

Issue 2132623002: Landing Recent QUIC changes until 2016-07-02 02:45 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing comment about RPCs Created 4 years, 5 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
« no previous file with comments | « net/quic/quic_server_session_base.cc ('k') | net/quic/quic_session.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/quic/quic_server_session_base.h" 5 #include "net/quic/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 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 // Bandwidth estimate has now changed sufficiently but not enough time has 452 // Bandwidth estimate has now changed sufficiently but not enough time has
453 // passed to send a Server Config Update. 453 // passed to send a Server Config Update.
454 bandwidth_estimate_kbytes_per_second = 454 bandwidth_estimate_kbytes_per_second =
455 bandwidth_estimate_kbytes_per_second * 1.6; 455 bandwidth_estimate_kbytes_per_second * 1.6;
456 session_->OnCongestionWindowChange(now); 456 session_->OnCongestionWindowChange(now);
457 457
458 // Bandwidth estimate has now changed sufficiently and enough time has passed, 458 // Bandwidth estimate has now changed sufficiently and enough time has passed,
459 // but not enough packets have been sent. 459 // but not enough packets have been sent.
460 int64_t srtt_ms = 460 int64_t srtt_ms =
461 sent_packet_manager->GetRttStats()->smoothed_rtt().ToMilliseconds(); 461 sent_packet_manager->GetRttStats()->smoothed_rtt().ToMilliseconds();
462 now = now.Add(QuicTime::Delta::FromMilliseconds( 462 now = now + QuicTime::Delta::FromMilliseconds(
463 kMinIntervalBetweenServerConfigUpdatesRTTs * srtt_ms)); 463 kMinIntervalBetweenServerConfigUpdatesRTTs * srtt_ms);
464 session_->OnCongestionWindowChange(now); 464 session_->OnCongestionWindowChange(now);
465 465
466 // The connection no longer has pending data to be written. 466 // The connection no longer has pending data to be written.
467 session_->OnCanWrite(); 467 session_->OnCanWrite();
468 EXPECT_FALSE(session_->HasDataToWrite()); 468 EXPECT_FALSE(session_->HasDataToWrite());
469 session_->OnCongestionWindowChange(now); 469 session_->OnCongestionWindowChange(now);
470 470
471 // Bandwidth estimate has now changed sufficiently, enough time has passed, 471 // Bandwidth estimate has now changed sufficiently, enough time has passed,
472 // and enough packets have been sent. 472 // and enough packets have been sent.
473 QuicConnectionPeer::SetPacketNumberOfLastSentPacket( 473 QuicConnectionPeer::SetPacketNumberOfLastSentPacket(
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 EXPECT_FALSE( 564 EXPECT_FALSE(
565 QuicServerSessionBasePeer::IsBandwidthResumptionEnabled(session_.get())); 565 QuicServerSessionBasePeer::IsBandwidthResumptionEnabled(session_.get()));
566 session_->OnConfigNegotiated(); 566 session_->OnConfigNegotiated();
567 EXPECT_FALSE( 567 EXPECT_FALSE(
568 QuicServerSessionBasePeer::IsBandwidthResumptionEnabled(session_.get())); 568 QuicServerSessionBasePeer::IsBandwidthResumptionEnabled(session_.get()));
569 } 569 }
570 570
571 } // namespace 571 } // namespace
572 } // namespace test 572 } // namespace test
573 } // namespace net 573 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_server_session_base.cc ('k') | net/quic/quic_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698