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

Side by Side Diff: net/tools/quic/test_tools/quic_test_utils.cc

Issue 669813003: Update from chromium https://crrev.com/301725/ (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/test_tools/quic_test_utils.h ('k') | net/tools/quic/test_tools/server_thread.h » ('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/test_tools/quic_test_utils.h" 5 #include "net/tools/quic/test_tools/quic_test_utils.h"
6 6
7 #include "net/quic/quic_connection.h" 7 #include "net/quic/quic_connection.h"
8 #include "net/quic/test_tools/quic_connection_peer.h" 8 #include "net/quic/test_tools/quic_connection_peer.h"
9 #include "net/quic/test_tools/quic_test_utils.h" 9 #include "net/quic/test_tools/quic_test_utils.h"
10 #include "net/tools/quic/quic_epoll_connection_helper.h" 10 #include "net/tools/quic/quic_epoll_connection_helper.h"
11 11
12 using base::StringPiece; 12 using base::StringPiece;
13 using net::test::MakeAckFrame; 13 using net::test::MakeAckFrame;
14 using net::test::MockHelper; 14 using net::test::MockHelper;
15 using net::test::QuicConnectionPeer; 15 using net::test::QuicConnectionPeer;
16 16
17 namespace net { 17 namespace net {
18 namespace tools { 18 namespace tools {
19 namespace test { 19 namespace test {
20 20
21 namespace { 21 namespace {
22 class NiceMockPacketWriterFactory 22 class NiceMockPacketWriterFactory
23 : public QuicConnection::PacketWriterFactory { 23 : public QuicConnection::PacketWriterFactory {
24 public: 24 public:
25 NiceMockPacketWriterFactory() {} 25 NiceMockPacketWriterFactory() {}
26 virtual ~NiceMockPacketWriterFactory() {} 26 ~NiceMockPacketWriterFactory() override {}
27 27
28 virtual QuicPacketWriter* Create( 28 QuicPacketWriter* Create(QuicConnection* /*connection*/) const override {
29 QuicConnection* /*connection*/) const override {
30 return new testing::NiceMock<MockPacketWriter>(); 29 return new testing::NiceMock<MockPacketWriter>();
31 } 30 }
32 31
33 private: 32 private:
34 DISALLOW_COPY_AND_ASSIGN(NiceMockPacketWriterFactory); 33 DISALLOW_COPY_AND_ASSIGN(NiceMockPacketWriterFactory);
35 }; 34 };
36 } // namespace 35 } // namespace
37 36
38 MockConnection::MockConnection(bool is_server) 37 MockConnection::MockConnection(bool is_server)
39 : QuicConnection(kTestConnectionId, 38 : QuicConnection(kTestConnectionId,
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 factory_->current_writer_ = this; 173 factory_->current_writer_ = this;
175 return QuicPerConnectionPacketWriter::WritePacket(buffer, 174 return QuicPerConnectionPacketWriter::WritePacket(buffer,
176 buf_len, 175 buf_len,
177 self_address, 176 self_address,
178 peer_address); 177 peer_address);
179 } 178 }
180 179
181 } // namespace test 180 } // namespace test
182 } // namespace tools 181 } // namespace tools
183 } // namespace net 182 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/test_tools/quic_test_utils.h ('k') | net/tools/quic/test_tools/server_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698