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

Unified Diff: net/quic/test_tools/quic_test_utils.cc

Issue 1667003002: Replace QuicEncryptedPacket's fields with equivalents in SerializedPacket. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@113395732
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/test_tools/quic_packet_creator_peer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/test_tools/quic_test_utils.cc
diff --git a/net/quic/test_tools/quic_test_utils.cc b/net/quic/test_tools/quic_test_utils.cc
index 51a3d97e28f77ac6ce5bf84c611d865a7cddc99d..3a884cb94e2550767633417c9ecaa81ec4dabe6e 100644
--- a/net/quic/test_tools/quic_test_utils.cc
+++ b/net/quic/test_tools/quic_test_utils.cc
@@ -295,11 +295,8 @@ PacketSavingConnection::~PacketSavingConnection() {
}
void PacketSavingConnection::SendOrQueuePacket(SerializedPacket* packet) {
- if (!packet->packet->owns_buffer()) {
- scoped_ptr<QuicEncryptedPacket> encrypted_deleter(packet->packet);
- packet->packet = packet->packet->Clone();
- }
- encrypted_packets_.push_back(packet->packet);
+ encrypted_packets_.push_back(new QuicEncryptedPacket(
+ QuicUtils::CopyBuffer(*packet), packet->encrypted_length, true));
// Transfer ownership of the packet to the SentPacketManager and the
// ack notifier to the AckNotifierManager.
sent_packet_manager_.OnPacketSent(packet, 0, QuicTime::Zero(), 1000,
« no previous file with comments | « net/quic/test_tools/quic_packet_creator_peer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698