OLD | NEW |
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 #include "net/tools/quic/quic_dispatcher.h" | 5 #include "net/tools/quic/quic_dispatcher.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <ostream> | 8 #include <ostream> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 | 93 |
94 class TestDispatcher : public QuicDispatcher { | 94 class TestDispatcher : public QuicDispatcher { |
95 public: | 95 public: |
96 TestDispatcher(const QuicConfig& config, | 96 TestDispatcher(const QuicConfig& config, |
97 const QuicCryptoServerConfig* crypto_config, | 97 const QuicCryptoServerConfig* crypto_config, |
98 EpollServer* eps) | 98 EpollServer* eps) |
99 : QuicDispatcher( | 99 : QuicDispatcher( |
100 config, | 100 config, |
101 crypto_config, | 101 crypto_config, |
102 QuicSupportedVersions(), | 102 QuicSupportedVersions(), |
103 new QuicEpollConnectionHelper(eps, QuicAllocator::BUFFER_POOL)) {} | 103 std::unique_ptr<QuicEpollConnectionHelper>( |
| 104 new QuicEpollConnectionHelper(eps, |
| 105 QuicAllocator::BUFFER_POOL))) {} |
104 | 106 |
105 MOCK_METHOD2(CreateQuicSession, | 107 MOCK_METHOD2(CreateQuicSession, |
106 QuicServerSessionBase*(QuicConnectionId connection_id, | 108 QuicServerSessionBase*(QuicConnectionId connection_id, |
107 const IPEndPoint& client_address)); | 109 const IPEndPoint& client_address)); |
108 | 110 |
109 using QuicDispatcher::current_server_address; | 111 using QuicDispatcher::current_server_address; |
110 using QuicDispatcher::current_client_address; | 112 using QuicDispatcher::current_client_address; |
111 }; | 113 }; |
112 | 114 |
113 // A Connection class which unregisters the session from the dispatcher when | 115 // A Connection class which unregisters the session from the dispatcher when |
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
837 | 839 |
838 // And we'll resume where we left off when we get another call. | 840 // And we'll resume where we left off when we get another call. |
839 EXPECT_CALL(*connection2(), OnCanWrite()); | 841 EXPECT_CALL(*connection2(), OnCanWrite()); |
840 dispatcher_.OnCanWrite(); | 842 dispatcher_.OnCanWrite(); |
841 EXPECT_FALSE(dispatcher_.HasPendingWrites()); | 843 EXPECT_FALSE(dispatcher_.HasPendingWrites()); |
842 } | 844 } |
843 | 845 |
844 } // namespace | 846 } // namespace |
845 } // namespace test | 847 } // namespace test |
846 } // namespace net | 848 } // namespace net |
OLD | NEW |