| 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 <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/strings/string_piece.h" | 9 #include "base/strings/string_piece.h" |
| 10 #include "net/quic/crypto/crypto_handshake.h" | 10 #include "net/quic/crypto/crypto_handshake.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 } | 43 } |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 namespace { | 46 namespace { |
| 47 | 47 |
| 48 class TestDispatcher : public QuicDispatcher { | 48 class TestDispatcher : public QuicDispatcher { |
| 49 public: | 49 public: |
| 50 explicit TestDispatcher(const QuicConfig& config, | 50 explicit TestDispatcher(const QuicConfig& config, |
| 51 const QuicCryptoServerConfig& crypto_config, | 51 const QuicCryptoServerConfig& crypto_config, |
| 52 EpollServer* eps) | 52 EpollServer* eps) |
| 53 : QuicDispatcher(1, eps) {} | 53 : QuicDispatcher(config, crypto_config, 1, eps) {} |
| 54 | 54 |
| 55 MOCK_METHOD4(CreateQuicSession, QuicSession*( | 55 MOCK_METHOD4(CreateQuicSession, QuicSession*( |
| 56 QuicGuid guid, | 56 QuicGuid guid, |
| 57 const IPEndPoint& client_address, | 57 const IPEndPoint& client_address, |
| 58 int fd, | 58 int fd, |
| 59 EpollServer* eps)); | 59 EpollServer* eps)); |
| 60 using QuicDispatcher::write_blocked_list; | 60 using QuicDispatcher::write_blocked_list; |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 // A Connection class which unregisters the session from the dispatcher | 63 // A Connection class which unregisters the session from the dispatcher |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 // And we'll resume where we left off when we get another call. | 379 // And we'll resume where we left off when we get another call. |
| 380 EXPECT_CALL(*connection2(), OnCanWrite()); | 380 EXPECT_CALL(*connection2(), OnCanWrite()); |
| 381 dispatcher_.OnCanWrite(); | 381 dispatcher_.OnCanWrite(); |
| 382 } | 382 } |
| 383 | 383 |
| 384 | 384 |
| 385 } // namespace | 385 } // namespace |
| 386 } // namespace test | 386 } // namespace test |
| 387 } // namespace tools | 387 } // namespace tools |
| 388 } // namespace net | 388 } // namespace net |
| OLD | NEW |