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

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

Issue 1542123002: Add path_id to SerializedPacket. No functional change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@110310127
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.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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 RetransmittableFrames* retransmittable_frames = 454 RetransmittableFrames* retransmittable_frames =
455 retransmittable == HAS_RETRANSMITTABLE_DATA 455 retransmittable == HAS_RETRANSMITTABLE_DATA
456 ? new RetransmittableFrames() 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 SerializedPacket serialized_packet( 463 SerializedPacket serialized_packet(
464 packet_number, PACKET_6BYTE_PACKET_NUMBER, buffer, encrypted_length, 464 kDefaultPathId, packet_number, PACKET_6BYTE_PACKET_NUMBER, buffer,
465 false, entropy_hash, retransmittable_frames, has_ack, 465 encrypted_length, false, entropy_hash, retransmittable_frames, has_ack,
466 has_pending_frames, ENCRYPTION_NONE); 466 has_pending_frames, ENCRYPTION_NONE);
467 OnSerializedPacket(&serialized_packet); 467 OnSerializedPacket(&serialized_packet);
468 } 468 }
469 469
470 QuicConsumedData SendStreamDataWithString( 470 QuicConsumedData SendStreamDataWithString(
471 QuicStreamId id, 471 QuicStreamId id,
472 StringPiece data, 472 StringPiece data,
473 QuicStreamOffset offset, 473 QuicStreamOffset offset,
474 bool fin, 474 bool fin,
475 QuicAckListenerInterface* listener) { 475 QuicAckListenerInterface* listener) {
(...skipping 5027 matching lines...) Expand 10 before | Expand all | Expand 10 after
5503 EXPECT_CALL(visitor_, 5503 EXPECT_CALL(visitor_,
5504 OnConnectionClosed(QUIC_UNENCRYPTED_STREAM_DATA, false)); 5504 OnConnectionClosed(QUIC_UNENCRYPTED_STREAM_DATA, false));
5505 EXPECT_DFATAL(connection_.SendStreamDataWithString(3, "", 0, kFin, nullptr), 5505 EXPECT_DFATAL(connection_.SendStreamDataWithString(3, "", 0, kFin, nullptr),
5506 "Cannot send stream data without encryption."); 5506 "Cannot send stream data without encryption.");
5507 EXPECT_FALSE(connection_.connected()); 5507 EXPECT_FALSE(connection_.connected());
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.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698