| OLD | NEW |
| 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/stl_util.h" | 7 #include "base/stl_util.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "net/quic/crypto/crypto_framer.h" | 9 #include "net/quic/crypto/crypto_framer.h" |
| 10 #include "net/quic/crypto/crypto_handshake.h" | 10 #include "net/quic/crypto/crypto_handshake.h" |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 PacketSavingConnection::~PacketSavingConnection() { | 300 PacketSavingConnection::~PacketSavingConnection() { |
| 301 STLDeleteElements(&packets_); | 301 STLDeleteElements(&packets_); |
| 302 STLDeleteElements(&encrypted_packets_); | 302 STLDeleteElements(&encrypted_packets_); |
| 303 } | 303 } |
| 304 | 304 |
| 305 bool PacketSavingConnection::SendOrQueuePacket( | 305 bool PacketSavingConnection::SendOrQueuePacket( |
| 306 EncryptionLevel level, | 306 EncryptionLevel level, |
| 307 const SerializedPacket& packet, | 307 const SerializedPacket& packet, |
| 308 TransmissionType transmission_type) { | 308 TransmissionType transmission_type) { |
| 309 packets_.push_back(packet.packet); | 309 packets_.push_back(packet.packet); |
| 310 QuicEncryptedPacket* encrypted = | 310 QuicEncryptedPacket* encrypted = QuicConnectionPeer::GetFramer(this)-> |
| 311 framer_.EncryptPacket(level, packet.sequence_number, *packet.packet); | 311 EncryptPacket(level, packet.sequence_number, *packet.packet); |
| 312 encrypted_packets_.push_back(encrypted); | 312 encrypted_packets_.push_back(encrypted); |
| 313 return true; | 313 return true; |
| 314 } | 314 } |
| 315 | 315 |
| 316 MockSession::MockSession(QuicConnection* connection) | 316 MockSession::MockSession(QuicConnection* connection) |
| 317 : QuicSession(connection, DefaultQuicConfig()) { | 317 : QuicSession(connection, DefaultQuicConfig()) { |
| 318 ON_CALL(*this, WritevData(_, _, _, _, _, _)) | 318 ON_CALL(*this, WritevData(_, _, _, _, _, _)) |
| 319 .WillByDefault(testing::Return(QuicConsumedData(0, false))); | 319 .WillByDefault(testing::Return(QuicConsumedData(0, false))); |
| 320 } | 320 } |
| 321 | 321 |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 data.AppendToString(&data_); | 542 data.AppendToString(&data_); |
| 543 return true; | 543 return true; |
| 544 } | 544 } |
| 545 | 545 |
| 546 void TestDecompressorVisitor::OnDecompressionError() { | 546 void TestDecompressorVisitor::OnDecompressionError() { |
| 547 error_ = true; | 547 error_ = true; |
| 548 } | 548 } |
| 549 | 549 |
| 550 } // namespace test | 550 } // namespace test |
| 551 } // namespace net | 551 } // namespace net |
| OLD | NEW |