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 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
769 } | 769 } |
770 | 770 |
771 QuicPacketEntropyHash ProcessFramePacket(QuicFrame frame) { | 771 QuicPacketEntropyHash ProcessFramePacket(QuicFrame frame) { |
772 QuicFrames frames; | 772 QuicFrames frames; |
773 frames.push_back(QuicFrame(frame)); | 773 frames.push_back(QuicFrame(frame)); |
774 QuicPacketCreatorPeer::SetSendVersionInPacket( | 774 QuicPacketCreatorPeer::SetSendVersionInPacket( |
775 &peer_creator_, connection_.perspective() == Perspective::IS_SERVER); | 775 &peer_creator_, connection_.perspective() == Perspective::IS_SERVER); |
776 | 776 |
777 char buffer[kMaxPacketSize]; | 777 char buffer[kMaxPacketSize]; |
778 SerializedPacket serialized_packet = | 778 SerializedPacket serialized_packet = |
779 peer_creator_.SerializeAllFrames(frames, buffer, kMaxPacketSize); | 779 QuicPacketCreatorPeer::SerializeAllFrames(&peer_creator_, frames, |
| 780 buffer, kMaxPacketSize); |
780 scoped_ptr<QuicEncryptedPacket> encrypted(serialized_packet.packet); | 781 scoped_ptr<QuicEncryptedPacket> encrypted(serialized_packet.packet); |
781 connection_.ProcessUdpPacket(kSelfAddress, kPeerAddress, *encrypted); | 782 connection_.ProcessUdpPacket(kSelfAddress, kPeerAddress, *encrypted); |
782 return serialized_packet.entropy_hash; | 783 return serialized_packet.entropy_hash; |
783 } | 784 } |
784 | 785 |
785 QuicPacketEntropyHash ProcessFramePacketAtLevel(QuicPathId path_id, | 786 QuicPacketEntropyHash ProcessFramePacketAtLevel(QuicPathId path_id, |
786 QuicPacketNumber number, | 787 QuicPacketNumber number, |
787 QuicFrame frame, | 788 QuicFrame frame, |
788 EncryptionLevel level) { | 789 EncryptionLevel level) { |
789 QuicPacketHeader header; | 790 QuicPacketHeader header; |
(...skipping 4894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5684 QuicStreamFrame stream_frame(1u, false, 0u, StringPiece()); | 5685 QuicStreamFrame stream_frame(1u, false, 0u, StringPiece()); |
5685 EXPECT_DFATAL(ProcessFramePacket(QuicFrame(&stream_frame)), | 5686 EXPECT_DFATAL(ProcessFramePacket(QuicFrame(&stream_frame)), |
5686 "Received a packet with multipath flag on when multipath is " | 5687 "Received a packet with multipath flag on when multipath is " |
5687 "not enabled."); | 5688 "not enabled."); |
5688 EXPECT_FALSE(connection_.connected()); | 5689 EXPECT_FALSE(connection_.connected()); |
5689 } | 5690 } |
5690 | 5691 |
5691 } // namespace | 5692 } // namespace |
5692 } // namespace test | 5693 } // namespace test |
5693 } // namespace net | 5694 } // namespace net |
OLD | NEW |