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

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

Issue 467963002: Refactoring: Create per-connection packet writers in QuicDispatcher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More review comments Created 6 years, 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef NET_QUIC_TEST_TOOLS_MOCK_QUIC_DISPATCHER_H_ 5 #ifndef NET_QUIC_TEST_TOOLS_MOCK_QUIC_DISPATCHER_H_
6 #define NET_QUIC_TEST_TOOLS_MOCK_QUIC_DISPATCHER_H_ 6 #define NET_QUIC_TEST_TOOLS_MOCK_QUIC_DISPATCHER_H_
7 7
8 #include "net/base/ip_endpoint.h" 8 #include "net/base/ip_endpoint.h"
9 #include "net/quic/crypto/quic_crypto_server_config.h" 9 #include "net/quic/crypto/quic_crypto_server_config.h"
10 #include "net/quic/quic_config.h" 10 #include "net/quic/quic_config.h"
11 #include "net/quic/quic_dispatcher.h" 11 #include "net/quic/quic_dispatcher.h"
12 #include "net/quic/quic_protocol.h" 12 #include "net/quic/quic_protocol.h"
13 #include "testing/gmock/include/gmock/gmock.h" 13 #include "testing/gmock/include/gmock/gmock.h"
14 14
15 namespace net { 15 namespace net {
16 namespace test { 16 namespace test {
17 17
18 class MockQuicDispatcher : public QuicDispatcher { 18 class MockQuicDispatcher : public QuicDispatcher {
19 public: 19 public:
20 MockQuicDispatcher(const QuicConfig& config, 20 MockQuicDispatcher(const QuicConfig& config,
21 const QuicCryptoServerConfig& crypto_config, 21 const QuicCryptoServerConfig& crypto_config,
22 PacketWriterFactory* packet_writer_factory,
22 QuicConnectionHelperInterface* helper); 23 QuicConnectionHelperInterface* helper);
23 24
24 virtual ~MockQuicDispatcher(); 25 virtual ~MockQuicDispatcher();
25 26
26 MOCK_METHOD3(ProcessPacket, void(const IPEndPoint& server_address, 27 MOCK_METHOD3(ProcessPacket, void(const IPEndPoint& server_address,
27 const IPEndPoint& client_address, 28 const IPEndPoint& client_address,
28 const QuicEncryptedPacket& packet)); 29 const QuicEncryptedPacket& packet));
29 30
30 private: 31 private:
31 DISALLOW_COPY_AND_ASSIGN(MockQuicDispatcher); 32 DISALLOW_COPY_AND_ASSIGN(MockQuicDispatcher);
32 }; 33 };
33 34
34 } // namespace test 35 } // namespace test
35 } // namespace net 36 } // namespace net
36 37
37 #endif // NET_QUIC_TEST_TOOLS_MOCK_QUIC_DISPATCHER_H_ 38 #endif // NET_QUIC_TEST_TOOLS_MOCK_QUIC_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698