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

Side by Side Diff: net/tools/quic/quic_dispatcher_test.cc

Issue 1907773002: Make QuicDispatcher's helper argument be a unique_ptr to make ownership (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@119678304
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/tools/quic/quic_dispatcher.cc ('k') | net/tools/quic/quic_server.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 (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
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
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
OLDNEW
« no previous file with comments | « net/tools/quic/quic_dispatcher.cc ('k') | net/tools/quic/quic_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698