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

Side by Side Diff: net/quic/test_tools/quic_test_utils.cc

Issue 605733006: Land Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert Patch Set 3 Created 6 years, 2 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 | « net/quic/test_tools/quic_config_peer.cc ('k') | net/tools/quic/quic_server_session.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/test_tools/quic_test_utils.h" 5 #include "net/quic/test_tools/quic_test_utils.h"
6 6
7 #include "base/sha1.h" 7 #include "base/sha1.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "net/quic/crypto/crypto_framer.h" 10 #include "net/quic/crypto/crypto_framer.h"
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 304
305 void PacketSavingConnection::SendOrQueuePacket(QueuedPacket packet) { 305 void PacketSavingConnection::SendOrQueuePacket(QueuedPacket packet) {
306 packets_.push_back(packet.serialized_packet.packet); 306 packets_.push_back(packet.serialized_packet.packet);
307 QuicEncryptedPacket* encrypted = QuicConnectionPeer::GetFramer(this)-> 307 QuicEncryptedPacket* encrypted = QuicConnectionPeer::GetFramer(this)->
308 EncryptPacket(packet.encryption_level, 308 EncryptPacket(packet.encryption_level,
309 packet.serialized_packet.sequence_number, 309 packet.serialized_packet.sequence_number,
310 *packet.serialized_packet.packet); 310 *packet.serialized_packet.packet);
311 encrypted_packets_.push_back(encrypted); 311 encrypted_packets_.push_back(encrypted);
312 // Transfer ownership of the packet to the SentPacketManager and the 312 // Transfer ownership of the packet to the SentPacketManager and the
313 // ack notifier to the AckNotifierManager. 313 // ack notifier to the AckNotifierManager.
314 sent_packet_manager_.OnSerializedPacket(packet.serialized_packet); 314 sent_packet_manager_.OnPacketSent(
315 &packet.serialized_packet, 0, QuicTime::Zero(), 1000,
316 NOT_RETRANSMISSION, HAS_RETRANSMITTABLE_DATA);
315 } 317 }
316 318
317 MockSession::MockSession(QuicConnection* connection) 319 MockSession::MockSession(QuicConnection* connection)
318 : QuicSession(connection, DefaultQuicConfig()) { 320 : QuicSession(connection, DefaultQuicConfig()) {
319 InitializeSession(); 321 InitializeSession();
320 ON_CALL(*this, WritevData(_, _, _, _, _, _)) 322 ON_CALL(*this, WritevData(_, _, _, _, _, _))
321 .WillByDefault(testing::Return(QuicConsumedData(0, false))); 323 .WillByDefault(testing::Return(QuicConsumedData(0, false)));
322 } 324 }
323 325
324 MockSession::~MockSession() { 326 MockSession::~MockSession() {
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 // different way, so TestWriterFactory::OnPacketSent might never be called. 669 // different way, so TestWriterFactory::OnPacketSent might never be called.
668 factory_->current_writer_ = this; 670 factory_->current_writer_ = this;
669 return QuicPerConnectionPacketWriter::WritePacket(buffer, 671 return QuicPerConnectionPacketWriter::WritePacket(buffer,
670 buf_len, 672 buf_len,
671 self_address, 673 self_address,
672 peer_address); 674 peer_address);
673 } 675 }
674 676
675 } // namespace test 677 } // namespace test
676 } // namespace net 678 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/quic_config_peer.cc ('k') | net/tools/quic/quic_server_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698