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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 class TestDispatcher : public QuicDispatcher { | 45 class TestDispatcher : public QuicDispatcher { |
46 public: | 46 public: |
47 explicit TestDispatcher(const QuicConfig& config, | 47 explicit TestDispatcher(const QuicConfig& config, |
48 const QuicCryptoServerConfig& crypto_config, | 48 const QuicCryptoServerConfig& crypto_config, |
49 EpollServer* eps) | 49 EpollServer* eps) |
50 : QuicDispatcher(config, | 50 : QuicDispatcher(config, |
51 crypto_config, | 51 crypto_config, |
52 QuicSupportedVersions(), | 52 QuicSupportedVersions(), |
53 new QuicDispatcher::DefaultPacketWriterFactory(), | 53 new QuicDispatcher::DefaultPacketWriterFactory(), |
54 eps) { | 54 new QuicEpollConnectionHelper(eps)) { |
55 } | 55 } |
56 | 56 |
57 MOCK_METHOD3(CreateQuicSession, QuicSession*( | 57 MOCK_METHOD3(CreateQuicSession, QuicSession*( |
58 QuicConnectionId connection_id, | 58 QuicConnectionId connection_id, |
59 const IPEndPoint& server_address, | 59 const IPEndPoint& server_address, |
60 const IPEndPoint& client_address)); | 60 const IPEndPoint& client_address)); |
61 | 61 |
62 using QuicDispatcher::current_server_address; | 62 using QuicDispatcher::current_server_address; |
63 using QuicDispatcher::current_client_address; | 63 using QuicDispatcher::current_client_address; |
64 }; | 64 }; |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 // And we'll resume where we left off when we get another call. | 473 // And we'll resume where we left off when we get another call. |
474 EXPECT_CALL(*connection2(), OnCanWrite()); | 474 EXPECT_CALL(*connection2(), OnCanWrite()); |
475 dispatcher_.OnCanWrite(); | 475 dispatcher_.OnCanWrite(); |
476 EXPECT_FALSE(dispatcher_.HasPendingWrites()); | 476 EXPECT_FALSE(dispatcher_.HasPendingWrites()); |
477 } | 477 } |
478 | 478 |
479 } // namespace | 479 } // namespace |
480 } // namespace test | 480 } // namespace test |
481 } // namespace tools | 481 } // namespace tools |
482 } // namespace net | 482 } // namespace net |
OLD | NEW |