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

Side by Side Diff: net/tools/quic/test_tools/packet_dropping_test_writer.h

Issue 1893083002: Change scoped_ptr to std::unique_ptr in //net. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-net-all: iwyu 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_PACKET_DROPPING_TEST_WRITER_H_ 5 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_PACKET_DROPPING_TEST_WRITER_H_
6 #define NET_TOOLS_QUIC_TEST_TOOLS_PACKET_DROPPING_TEST_WRITER_H_ 6 #define NET_TOOLS_QUIC_TEST_TOOLS_PACKET_DROPPING_TEST_WRITER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <list> 11 #include <list>
12 #include <memory>
12 #include <string> 13 #include <string>
13 14
14 #include "base/logging.h" 15 #include "base/logging.h"
15 #include "base/macros.h" 16 #include "base/macros.h"
16 #include "base/memory/scoped_ptr.h"
17 #include "base/synchronization/lock.h" 17 #include "base/synchronization/lock.h"
18 #include "net/base/ip_address.h" 18 #include "net/base/ip_address.h"
19 #include "net/quic/quic_alarm.h" 19 #include "net/quic/quic_alarm.h"
20 #include "net/quic/test_tools/quic_test_utils.h" 20 #include "net/quic/test_tools/quic_test_utils.h"
21 #include "net/tools/quic/quic_epoll_clock.h" 21 #include "net/tools/quic/quic_epoll_clock.h"
22 #include "net/tools/quic/quic_packet_writer_wrapper.h" 22 #include "net/tools/quic/quic_packet_writer_wrapper.h"
23 #include "net/tools/quic/test_tools/quic_test_client.h" 23 #include "net/tools/quic/test_tools/quic_test_client.h"
24 24
25 namespace net { 25 namespace net {
26 namespace test { 26 namespace test {
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 std::unique_ptr<PerPacketOptions> options; 146 std::unique_ptr<PerPacketOptions> options;
147 QuicTime send_time; 147 QuicTime send_time;
148 148
149 private: 149 private:
150 DISALLOW_COPY_AND_ASSIGN(DelayedWrite); 150 DISALLOW_COPY_AND_ASSIGN(DelayedWrite);
151 }; 151 };
152 152
153 typedef std::list<DelayedWrite> DelayedPacketList; 153 typedef std::list<DelayedWrite> DelayedPacketList;
154 154
155 const QuicClock* clock_; 155 const QuicClock* clock_;
156 scoped_ptr<QuicAlarm> write_unblocked_alarm_; 156 std::unique_ptr<QuicAlarm> write_unblocked_alarm_;
157 scoped_ptr<QuicAlarm> delay_alarm_; 157 std::unique_ptr<QuicAlarm> delay_alarm_;
158 scoped_ptr<Delegate> on_can_write_; 158 std::unique_ptr<Delegate> on_can_write_;
159 net::test::SimpleRandom simple_random_; 159 net::test::SimpleRandom simple_random_;
160 // Stored packets delayed by fake packet delay or bandwidth restrictions. 160 // Stored packets delayed by fake packet delay or bandwidth restrictions.
161 DelayedPacketList delayed_packets_; 161 DelayedPacketList delayed_packets_;
162 QuicByteCount cur_buffer_size_; 162 QuicByteCount cur_buffer_size_;
163 uint64_t num_calls_to_write_; 163 uint64_t num_calls_to_write_;
164 164
165 base::Lock config_mutex_; 165 base::Lock config_mutex_;
166 int32_t fake_packet_loss_percentage_; 166 int32_t fake_packet_loss_percentage_;
167 int32_t fake_drop_first_n_packets_; 167 int32_t fake_drop_first_n_packets_;
168 int32_t fake_blocked_socket_percentage_; 168 int32_t fake_blocked_socket_percentage_;
169 int32_t fake_packet_reorder_percentage_; 169 int32_t fake_packet_reorder_percentage_;
170 QuicTime::Delta fake_packet_delay_; 170 QuicTime::Delta fake_packet_delay_;
171 QuicBandwidth fake_bandwidth_; 171 QuicBandwidth fake_bandwidth_;
172 QuicByteCount buffer_size_; 172 QuicByteCount buffer_size_;
173 173
174 DISALLOW_COPY_AND_ASSIGN(PacketDroppingTestWriter); 174 DISALLOW_COPY_AND_ASSIGN(PacketDroppingTestWriter);
175 }; 175 };
176 176
177 } // namespace test 177 } // namespace test
178 } // namespace net 178 } // namespace net
179 179
180 #endif // NET_TOOLS_QUIC_TEST_TOOLS_PACKET_DROPPING_TEST_WRITER_H_ 180 #endif // NET_TOOLS_QUIC_TEST_TOOLS_PACKET_DROPPING_TEST_WRITER_H_
OLDNEW
« no previous file with comments | « net/tools/quic/synchronous_host_resolver.cc ('k') | net/tools/quic/test_tools/quic_test_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698