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 "net/quic/crypto/crypto_framer.h" | 8 #include "net/quic/crypto/crypto_framer.h" |
9 #include "net/quic/crypto/crypto_handshake.h" | 9 #include "net/quic/crypto/crypto_handshake.h" |
10 #include "net/quic/crypto/crypto_utils.h" | 10 #include "net/quic/crypto/crypto_utils.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 107 |
108 const QuicClock* MockHelper::GetClock() const { | 108 const QuicClock* MockHelper::GetClock() const { |
109 return &clock_; | 109 return &clock_; |
110 } | 110 } |
111 | 111 |
112 QuicRandom* MockHelper::GetRandomGenerator() { | 112 QuicRandom* MockHelper::GetRandomGenerator() { |
113 return &random_generator_; | 113 return &random_generator_; |
114 } | 114 } |
115 | 115 |
116 MockConnection::MockConnection(QuicGuid guid, IPEndPoint address) | 116 MockConnection::MockConnection(QuicGuid guid, IPEndPoint address) |
117 : QuicConnection(guid, address, new MockHelper()), | 117 : QuicConnection(guid, address, new MockHelper()) { |
118 helper_(helper()) { | |
119 } | 118 } |
120 | 119 |
121 MockConnection::MockConnection(QuicGuid guid, | 120 MockConnection::MockConnection(QuicGuid guid, |
122 IPEndPoint address, | 121 IPEndPoint address, |
123 QuicConnectionHelperInterface* helper) | 122 QuicConnectionHelperInterface* helper) |
124 : QuicConnection(guid, address, helper), | 123 : QuicConnection(guid, address, helper) { |
125 helper_(helper) { | |
126 } | 124 } |
127 | 125 |
128 MockConnection::~MockConnection() { | 126 MockConnection::~MockConnection() { |
129 } | 127 } |
130 | 128 |
131 PacketSavingConnection::PacketSavingConnection(QuicGuid guid, | 129 PacketSavingConnection::PacketSavingConnection(QuicGuid guid, |
132 IPEndPoint address) | 130 IPEndPoint address) |
133 : MockConnection(guid, address) { | 131 : MockConnection(guid, address) { |
134 } | 132 } |
135 | 133 |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 QuicPacketCreator::StreamFramePacketOverhead(1, include_version); | 350 QuicPacketCreator::StreamFramePacketOverhead(1, include_version); |
353 } | 351 } |
354 | 352 |
355 QuicPacketEntropyHash TestEntropyCalculator::ReceivedEntropyHash( | 353 QuicPacketEntropyHash TestEntropyCalculator::ReceivedEntropyHash( |
356 QuicPacketSequenceNumber sequence_number) const { | 354 QuicPacketSequenceNumber sequence_number) const { |
357 return 1u; | 355 return 1u; |
358 } | 356 } |
359 | 357 |
360 } // namespace test | 358 } // namespace test |
361 } // namespace net | 359 } // namespace net |
OLD | NEW |