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

Side by Side Diff: net/tools/quic/test_tools/mock_quic_server_session_visitor.h

Issue 2322233004: Landing Recent QUIC changes until Sun Sep 4 03:41:00 (Closed)
Patch Set: Remove simulation files from the build. Created 4 years, 3 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 (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 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_MOCK_QUIC_SERVER_SESSION_VISITOR_H_ 5 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_MOCK_QUIC_SERVER_SESSION_VISITOR_H_
6 #define NET_TOOLS_QUIC_TEST_TOOLS_MOCK_QUIC_SERVER_SESSION_VISITOR_H_ 6 #define NET_TOOLS_QUIC_TEST_TOOLS_MOCK_QUIC_SERVER_SESSION_VISITOR_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "net/quic/core/quic_crypto_server_stream.h"
9 #include "net/quic/core/quic_server_session_base.h" 10 #include "net/quic/core/quic_server_session_base.h"
10 #include "testing/gmock/include/gmock/gmock.h" 11 #include "testing/gmock/include/gmock/gmock.h"
11 12
12 namespace net { 13 namespace net {
13 namespace test { 14 namespace test {
14 15
15 class MockQuicServerSessionVisitor : public QuicServerSessionBase::Visitor { 16 class MockQuicServerSessionVisitor : public QuicServerSessionBase::Visitor {
16 public: 17 public:
17 MockQuicServerSessionVisitor(); 18 MockQuicServerSessionVisitor();
18 virtual ~MockQuicServerSessionVisitor() override; 19 virtual ~MockQuicServerSessionVisitor() override;
19 MOCK_METHOD3(OnConnectionClosed, 20 MOCK_METHOD3(OnConnectionClosed,
20 void(QuicConnectionId connection_id, 21 void(QuicConnectionId connection_id,
21 QuicErrorCode error, 22 QuicErrorCode error,
22 const std::string& error_details)); 23 const std::string& error_details));
23 MOCK_METHOD1(OnWriteBlocked, 24 MOCK_METHOD1(OnWriteBlocked,
24 void(QuicBlockedWriterInterface* blocked_writer)); 25 void(QuicBlockedWriterInterface* blocked_writer));
25 MOCK_METHOD1(OnConnectionAddedToTimeWaitList, 26 MOCK_METHOD1(OnConnectionAddedToTimeWaitList,
26 void(QuicConnectionId connection_id)); 27 void(QuicConnectionId connection_id));
28 MOCK_METHOD1(OnPacketBeingDispatchedToSession,
29 void(QuicServerSessionBase* session));
27 30
28 private: 31 private:
29 DISALLOW_COPY_AND_ASSIGN(MockQuicServerSessionVisitor); 32 DISALLOW_COPY_AND_ASSIGN(MockQuicServerSessionVisitor);
30 }; 33 };
31 34
32 class MockQuicServerSessionHelper : public QuicServerSessionBase::Helper { 35 class MockQuicCryptoServerStreamHelper : public QuicCryptoServerStream::Helper {
33 public: 36 public:
34 MockQuicServerSessionHelper(); 37 MockQuicCryptoServerStreamHelper();
35 ~MockQuicServerSessionHelper() override; 38 ~MockQuicCryptoServerStreamHelper() override;
36 MOCK_CONST_METHOD1(GenerateConnectionIdForReject, 39 MOCK_CONST_METHOD1(GenerateConnectionIdForReject,
37 QuicConnectionId(QuicConnectionId connection_id)); 40 QuicConnectionId(QuicConnectionId connection_id));
38 MOCK_CONST_METHOD3(CanAcceptClientHello, 41 MOCK_CONST_METHOD3(CanAcceptClientHello,
39 bool(const CryptoHandshakeMessage& message, 42 bool(const CryptoHandshakeMessage& message,
40 const IPEndPoint& self_address, 43 const IPEndPoint& self_address,
41 std::string* error_details)); 44 std::string* error_details));
42 45
43 private: 46 private:
44 DISALLOW_COPY_AND_ASSIGN(MockQuicServerSessionHelper); 47 DISALLOW_COPY_AND_ASSIGN(MockQuicCryptoServerStreamHelper);
45 }; 48 };
46 49
47 } // namespace test 50 } // namespace test
48 } // namespace net 51 } // namespace net
49 52
50 #endif // NET_TOOLS_QUIC_TEST_TOOLS_MOCK_QUIC_SERVER_SESSION_VISITOR_H_ 53 #endif // NET_TOOLS_QUIC_TEST_TOOLS_MOCK_QUIC_SERVER_SESSION_VISITOR_H_
OLDNEW
« no previous file with comments | « net/tools/quic/stateless_rejector_test.cc ('k') | net/tools/quic/test_tools/mock_quic_server_session_visitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698