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

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: 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 // 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 const string& reason)); 227 const string& reason));
228 MOCK_METHOD0(OnCanWrite, bool()); 228 MOCK_METHOD0(OnCanWrite, bool());
229 229
230 void ProcessUdpPacketInternal(const IPEndPoint& self_address, 230 void ProcessUdpPacketInternal(const IPEndPoint& self_address,
231 const IPEndPoint& peer_address, 231 const IPEndPoint& peer_address,
232 const QuicEncryptedPacket& packet) { 232 const QuicEncryptedPacket& packet) {
233 QuicConnection::ProcessUdpPacket(self_address, peer_address, packet); 233 QuicConnection::ProcessUdpPacket(self_address, peer_address, packet);
234 } 234 }
235 235
236 private: 236 private:
237 scoped_ptr<QuicConnectionHelperInterface> helper_;
238 DISALLOW_COPY_AND_ASSIGN(MockConnection); 237 DISALLOW_COPY_AND_ASSIGN(MockConnection);
239 }; 238 };
240 239
241 class PacketSavingConnection : public MockConnection { 240 class PacketSavingConnection : public MockConnection {
242 public: 241 public:
243 PacketSavingConnection(QuicGuid guid, IPEndPoint address); 242 PacketSavingConnection(QuicGuid guid, IPEndPoint address);
244 virtual ~PacketSavingConnection(); 243 virtual ~PacketSavingConnection();
245 244
246 virtual bool SendOrQueuePacket(QuicPacketSequenceNumber sequence_number, 245 virtual bool SendOrQueuePacket(QuicPacketSequenceNumber sequence_number,
247 QuicPacket* packet, 246 QuicPacket* packet,
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 virtual QuicPacketEntropyHash ReceivedEntropyHash( 308 virtual QuicPacketEntropyHash ReceivedEntropyHash(
310 QuicPacketSequenceNumber sequence_number) const OVERRIDE; 309 QuicPacketSequenceNumber sequence_number) const OVERRIDE;
311 310
312 }; 311 };
313 312
314 } // namespace test 313 } // namespace test
315 314
316 } // namespace net 315 } // namespace net
317 316
318 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 317 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698