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

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

Issue 1905843003: Split out QuicAlarm creation from QuicConnectionHelper to new QuicAlarmFactory. No behavior change,… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@119753783
Patch Set: Rebase Created 4 years, 8 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
« no previous file with comments | « net/quic/test_tools/crypto_test_utils.cc ('k') | net/quic/test_tools/mock_quic_dispatcher.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 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 "base/macros.h" 8 #include "base/macros.h"
9 #include "net/base/ip_endpoint.h" 9 #include "net/base/ip_endpoint.h"
10 #include "net/quic/crypto/quic_crypto_server_config.h" 10 #include "net/quic/crypto/quic_crypto_server_config.h"
11 #include "net/quic/quic_config.h" 11 #include "net/quic/quic_config.h"
12 #include "net/quic/quic_protocol.h" 12 #include "net/quic/quic_protocol.h"
13 #include "net/tools/quic/quic_dispatcher.h" 13 #include "net/tools/quic/quic_dispatcher.h"
14 #include "testing/gmock/include/gmock/gmock.h" 14 #include "testing/gmock/include/gmock/gmock.h"
15 15
16 namespace net { 16 namespace net {
17 namespace test { 17 namespace test {
18 18
19 class MockQuicDispatcher : public QuicDispatcher { 19 class MockQuicDispatcher : public QuicDispatcher {
20 public: 20 public:
21 MockQuicDispatcher(const QuicConfig& config, 21 MockQuicDispatcher(const QuicConfig& config,
22 const QuicCryptoServerConfig* crypto_config, 22 const QuicCryptoServerConfig* crypto_config,
23 std::unique_ptr<QuicConnectionHelperInterface> helper); 23 std::unique_ptr<QuicConnectionHelperInterface> helper,
24 std::unique_ptr<QuicAlarmFactory> alarm_factory);
24 25
25 ~MockQuicDispatcher() override; 26 ~MockQuicDispatcher() override;
26 27
27 MOCK_METHOD3(ProcessPacket, 28 MOCK_METHOD3(ProcessPacket,
28 void(const IPEndPoint& server_address, 29 void(const IPEndPoint& server_address,
29 const IPEndPoint& client_address, 30 const IPEndPoint& client_address,
30 const QuicReceivedPacket& packet)); 31 const QuicReceivedPacket& packet));
31 32
32 private: 33 private:
33 DISALLOW_COPY_AND_ASSIGN(MockQuicDispatcher); 34 DISALLOW_COPY_AND_ASSIGN(MockQuicDispatcher);
34 }; 35 };
35 36
36 } // namespace test 37 } // namespace test
37 } // namespace net 38 } // namespace net
38 39
39 #endif // NET_QUIC_TEST_TOOLS_MOCK_QUIC_DISPATCHER_H_ 40 #endif // NET_QUIC_TEST_TOOLS_MOCK_QUIC_DISPATCHER_H_
OLDNEW
« no previous file with comments | « net/quic/test_tools/crypto_test_utils.cc ('k') | net/quic/test_tools/mock_quic_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698