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

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

Issue 1495243002: Remove EncryptionLevel from QUIC's RetransmittableFrames and add it to TransmissionInfo. No functi… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@108735153
Patch Set: Created 5 years 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_connection.cc ('k') | 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/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 446
447 void SendPacket(EncryptionLevel level, 447 void SendPacket(EncryptionLevel level,
448 QuicPacketNumber packet_number, 448 QuicPacketNumber packet_number,
449 QuicPacket* packet, 449 QuicPacket* packet,
450 QuicPacketEntropyHash entropy_hash, 450 QuicPacketEntropyHash entropy_hash,
451 HasRetransmittableData retransmittable, 451 HasRetransmittableData retransmittable,
452 bool has_ack, 452 bool has_ack,
453 bool has_pending_frames) { 453 bool has_pending_frames) {
454 RetransmittableFrames* retransmittable_frames = 454 RetransmittableFrames* retransmittable_frames =
455 retransmittable == HAS_RETRANSMITTABLE_DATA 455 retransmittable == HAS_RETRANSMITTABLE_DATA
456 ? new RetransmittableFrames(ENCRYPTION_NONE) 456 ? new RetransmittableFrames()
457 : nullptr; 457 : nullptr;
458 char buffer[kMaxPacketSize]; 458 char buffer[kMaxPacketSize];
459 size_t encrypted_length = 459 size_t encrypted_length =
460 QuicConnectionPeer::GetFramer(this)->EncryptPayload( 460 QuicConnectionPeer::GetFramer(this)->EncryptPayload(
461 ENCRYPTION_NONE, packet_number, *packet, buffer, kMaxPacketSize); 461 ENCRYPTION_NONE, packet_number, *packet, buffer, kMaxPacketSize);
462 delete packet; 462 delete packet;
463 OnSerializedPacket(SerializedPacket( 463 OnSerializedPacket(SerializedPacket(
464 packet_number, PACKET_6BYTE_PACKET_NUMBER, buffer, encrypted_length, 464 packet_number, PACKET_6BYTE_PACKET_NUMBER, buffer, encrypted_length,
465 false, entropy_hash, retransmittable_frames, has_ack, 465 false, entropy_hash, retransmittable_frames, has_ack,
466 has_pending_frames, ENCRYPTION_NONE)); 466 has_pending_frames, ENCRYPTION_NONE));
(...skipping 5036 matching lines...) Expand 10 before | Expand all | Expand 10 after
5503 EXPECT_EQ(1u, writer_->stream_frames().size()); 5503 EXPECT_EQ(1u, writer_->stream_frames().size());
5504 EXPECT_TRUE(connection_.GetSendAlarm()->IsSet()); 5504 EXPECT_TRUE(connection_.GetSendAlarm()->IsSet());
5505 EXPECT_EQ(clock_.Now().Add(QuicTime::Delta::FromMilliseconds(2)), 5505 EXPECT_EQ(clock_.Now().Add(QuicTime::Delta::FromMilliseconds(2)),
5506 connection_.GetSendAlarm()->deadline()); 5506 connection_.GetSendAlarm()->deadline());
5507 writer_->Reset(); 5507 writer_->Reset();
5508 } 5508 }
5509 5509
5510 } // namespace 5510 } // namespace
5511 } // namespace test 5511 } // namespace test
5512 } // namespace net 5512 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection.cc ('k') | net/quic/quic_packet_creator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698