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

Side by Side Diff: net/quic/test_tools/quic_test_utils.h

Issue 2417183003: Remove stl_util's deletion functions from remaining quic code. (Closed)
Patch Set: rebase Created 4 years, 2 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/quic/test_tools/quic_stream_factory_peer.cc ('k') | net/quic/test_tools/quic_test_utils.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 // Common utilities for Quic tests 5 // Common utilities for Quic tests
6 6
7 #ifndef NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 7 #ifndef NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
8 #define NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 8 #define NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
9 9
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 488
489 PacketSavingConnection(MockQuicConnectionHelper* helper, 489 PacketSavingConnection(MockQuicConnectionHelper* helper,
490 MockAlarmFactory* alarm_factory, 490 MockAlarmFactory* alarm_factory,
491 Perspective perspective, 491 Perspective perspective,
492 const QuicVersionVector& supported_versions); 492 const QuicVersionVector& supported_versions);
493 493
494 ~PacketSavingConnection() override; 494 ~PacketSavingConnection() override;
495 495
496 void SendOrQueuePacket(SerializedPacket* packet) override; 496 void SendOrQueuePacket(SerializedPacket* packet) override;
497 497
498 std::vector<QuicEncryptedPacket*> encrypted_packets_; 498 std::vector<std::unique_ptr<QuicEncryptedPacket>> encrypted_packets_;
499 499
500 private: 500 private:
501 DISALLOW_COPY_AND_ASSIGN(PacketSavingConnection); 501 DISALLOW_COPY_AND_ASSIGN(PacketSavingConnection);
502 }; 502 };
503 503
504 class MockQuicSession : public QuicSession { 504 class MockQuicSession : public QuicSession {
505 public: 505 public:
506 // Takes ownership of |connection|. 506 // Takes ownership of |connection|.
507 explicit MockQuicSession(QuicConnection* connection); 507 explicit MockQuicSession(QuicConnection* connection);
508 ~MockQuicSession() override; 508 ~MockQuicSession() override;
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
1044 T absolute_margin = expected * relative_margin; 1044 T absolute_margin = expected * relative_margin;
1045 1045
1046 EXPECT_GE(expected + absolute_margin, actual); 1046 EXPECT_GE(expected + absolute_margin, actual);
1047 EXPECT_LE(expected - absolute_margin, actual); 1047 EXPECT_LE(expected - absolute_margin, actual);
1048 } 1048 }
1049 1049
1050 } // namespace test 1050 } // namespace test
1051 } // namespace net 1051 } // namespace net
1052 1052
1053 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 1053 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « net/quic/test_tools/quic_stream_factory_peer.cc ('k') | net/quic/test_tools/quic_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698