OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_connection.h" | 5 #include "net/quic/quic_connection.h" |
6 | 6 |
7 #include <ostream> | 7 #include <ostream> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 .WillRepeatedly(Return(QuicTime::Zero())); | 692 .WillRepeatedly(Return(QuicTime::Zero())); |
693 EXPECT_CALL(*loss_algorithm_, DetectLosses(_, _, _, _)).Times(AnyNumber()); | 693 EXPECT_CALL(*loss_algorithm_, DetectLosses(_, _, _, _)).Times(AnyNumber()); |
694 // TODO(ianswett): Fix QuicConnectionTests so they don't attempt to write | 694 // TODO(ianswett): Fix QuicConnectionTests so they don't attempt to write |
695 // non-crypto stream data at ENCRYPTION_NONE. | 695 // non-crypto stream data at ENCRYPTION_NONE. |
696 FLAGS_quic_never_write_unencrypted_data = false; | 696 FLAGS_quic_never_write_unencrypted_data = false; |
697 } | 697 } |
698 | 698 |
699 QuicVersion version() { return GetParam().version; } | 699 QuicVersion version() { return GetParam().version; } |
700 | 700 |
701 QuicAckFrame* outgoing_ack() { | 701 QuicAckFrame* outgoing_ack() { |
702 QuicConnectionPeer::PopulateAckFrame(&connection_, &ack_); | 702 if (FLAGS_quic_dont_copy_acks) { |
| 703 QuicFrame ack_frame = |
| 704 QuicConnectionPeer::GetUpdatedAckFrame(&connection_); |
| 705 ack_ = *ack_frame.ack_frame; |
| 706 } else { |
| 707 QuicConnectionPeer::PopulateAckFrame(&connection_, &ack_); |
| 708 } |
703 return &ack_; | 709 return &ack_; |
704 } | 710 } |
705 | 711 |
706 QuicStopWaitingFrame* stop_waiting() { | 712 QuicStopWaitingFrame* stop_waiting() { |
707 QuicConnectionPeer::PopulateStopWaitingFrame(&connection_, &stop_waiting_); | 713 QuicConnectionPeer::PopulateStopWaitingFrame(&connection_, &stop_waiting_); |
708 return &stop_waiting_; | 714 return &stop_waiting_; |
709 } | 715 } |
710 | 716 |
711 QuicPacketNumber least_unacked() { | 717 QuicPacketNumber least_unacked() { |
712 if (writer_->stop_waiting_frames().empty()) { | 718 if (writer_->stop_waiting_frames().empty()) { |
(...skipping 3984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4697 // result in multiple attempts to close the connection - it will be marked as | 4703 // result in multiple attempts to close the connection - it will be marked as |
4698 // disconnected after the first call. | 4704 // disconnected after the first call. |
4699 EXPECT_CALL(visitor_, OnConnectionClosed(_, _)).Times(1); | 4705 EXPECT_CALL(visitor_, OnConnectionClosed(_, _)).Times(1); |
4700 connection_.SendConnectionCloseWithDetails(QUIC_NO_ERROR, "no reason"); | 4706 connection_.SendConnectionCloseWithDetails(QUIC_NO_ERROR, "no reason"); |
4701 connection_.SendConnectionCloseWithDetails(QUIC_NO_ERROR, "no reason"); | 4707 connection_.SendConnectionCloseWithDetails(QUIC_NO_ERROR, "no reason"); |
4702 } | 4708 } |
4703 | 4709 |
4704 } // namespace | 4710 } // namespace |
4705 } // namespace test | 4711 } // namespace test |
4706 } // namespace net | 4712 } // namespace net |
OLD | NEW |