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

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

Issue 12545035: Refactor QuicClientSession so that it owns the underlying socket (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test leak 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
« no previous file with comments | « net/quic/quic_stream_factory.cc ('k') | net/quic/test_tools/quic_test_utils.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 // Common utilities for Quic tests 5 // Common utilities for Quic tests
6 6
7 #ifndef NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 7 #ifndef NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
8 #define NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 8 #define NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
9 9
10 #include <vector> 10 #include <vector>
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 const IPEndPoint& peer_address, 245 const IPEndPoint& peer_address,
246 const QuicEncryptedPacket& packet) { 246 const QuicEncryptedPacket& packet) {
247 QuicConnection::ProcessUdpPacket(self_address, peer_address, packet); 247 QuicConnection::ProcessUdpPacket(self_address, peer_address, packet);
248 } 248 }
249 249
250 virtual bool OnProtocolVersionMismatch(QuicVersionTag version) OVERRIDE { 250 virtual bool OnProtocolVersionMismatch(QuicVersionTag version) OVERRIDE {
251 return false; 251 return false;
252 } 252 }
253 253
254 private: 254 private:
255 scoped_ptr<QuicConnectionHelperInterface> helper_;
256 DISALLOW_COPY_AND_ASSIGN(MockConnection); 255 DISALLOW_COPY_AND_ASSIGN(MockConnection);
257 }; 256 };
258 257
259 class PacketSavingConnection : public MockConnection { 258 class PacketSavingConnection : public MockConnection {
260 public: 259 public:
261 PacketSavingConnection(QuicGuid guid, IPEndPoint address, bool is_server); 260 PacketSavingConnection(QuicGuid guid, IPEndPoint address, bool is_server);
262 virtual ~PacketSavingConnection(); 261 virtual ~PacketSavingConnection();
263 262
264 virtual bool SendOrQueuePacket(QuicPacketSequenceNumber sequence_number, 263 virtual bool SendOrQueuePacket(QuicPacketSequenceNumber sequence_number,
265 QuicPacket* packet, 264 QuicPacket* packet,
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 virtual QuicPacketEntropyHash ReceivedEntropyHash( 329 virtual QuicPacketEntropyHash ReceivedEntropyHash(
331 QuicPacketSequenceNumber sequence_number) const OVERRIDE; 330 QuicPacketSequenceNumber sequence_number) const OVERRIDE;
332 331
333 }; 332 };
334 333
335 } // namespace test 334 } // namespace test
336 335
337 } // namespace net 336 } // namespace net
338 337
339 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 338 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « net/quic/quic_stream_factory.cc ('k') | net/quic/test_tools/quic_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698