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

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

Issue 1658373002: Move QuicPacketCreator::SerializeAllFrames into QuicPacketCreatorPeer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0202
Patch Set: Created 4 years, 10 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 | « no previous file | net/quic/quic_packet_creator.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 (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
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
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
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_packet_creator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698