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

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

Issue 1502503002: Move encryption_level from QueuedPacket into SerializedPacket. No functional change. Not flag pro… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@108718393
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_logger.cc ('k') | net/quic/quic_packet_creator.cc » ('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 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(ENCRYPTION_NONE)
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( 463 OnSerializedPacket(SerializedPacket(
464 SerializedPacket(packet_number, PACKET_6BYTE_PACKET_NUMBER, buffer, 464 packet_number, PACKET_6BYTE_PACKET_NUMBER, buffer, encrypted_length,
465 encrypted_length, false, entropy_hash, 465 false, entropy_hash, retransmittable_frames, has_ack,
466 retransmittable_frames, has_ack, has_pending_frames)); 466 has_pending_frames, ENCRYPTION_NONE));
467 } 467 }
468 468
469 QuicConsumedData SendStreamDataWithString( 469 QuicConsumedData SendStreamDataWithString(
470 QuicStreamId id, 470 QuicStreamId id,
471 StringPiece data, 471 StringPiece data,
472 QuicStreamOffset offset, 472 QuicStreamOffset offset,
473 bool fin, 473 bool fin,
474 QuicAckListenerInterface* listener) { 474 QuicAckListenerInterface* listener) {
475 return SendStreamDataWithStringHelper(id, data, offset, fin, 475 return SendStreamDataWithStringHelper(id, data, offset, fin,
476 MAY_FEC_PROTECT, listener); 476 MAY_FEC_PROTECT, listener);
(...skipping 5026 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_logger.cc ('k') | net/quic/quic_packet_creator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698