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

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

Issue 12545035: Refactor QuicClientSession so that it owns the underlying socket (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
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/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
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
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
OLDNEW
« net/quic/quic_connection_test.cc ('K') | « net/quic/test_tools/quic_test_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698