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

Side by Side Diff: net/tools/quic/quic_client.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
« no previous file with comments | « net/tools/quic/end_to_end_test.cc ('k') | net/tools/quic/quic_client_base.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 // A toy client, which connects to a specified port and sends QUIC 5 // A toy client, which connects to a specified port and sends QUIC
6 // request to that endpoint. 6 // request to that endpoint.
7 7
8 #ifndef NET_TOOLS_QUIC_QUIC_CLIENT_H_ 8 #ifndef NET_TOOLS_QUIC_QUIC_CLIENT_H_
9 #define NET_TOOLS_QUIC_QUIC_CLIENT_H_ 9 #define NET_TOOLS_QUIC_QUIC_CLIENT_H_
10 10
11 #include <stddef.h> 11 #include <stddef.h>
12 12
13 #include <memory>
13 #include <string> 14 #include <string>
14 15
15 #include "base/command_line.h" 16 #include "base/command_line.h"
16 #include "base/macros.h" 17 #include "base/macros.h"
17 #include "base/memory/scoped_ptr.h"
18 #include "base/strings/string_piece.h" 18 #include "base/strings/string_piece.h"
19 #include "net/base/ip_address.h" 19 #include "net/base/ip_address.h"
20 #include "net/base/ip_endpoint.h" 20 #include "net/base/ip_endpoint.h"
21 #include "net/quic/quic_client_push_promise_index.h" 21 #include "net/quic/quic_client_push_promise_index.h"
22 #include "net/quic/quic_config.h" 22 #include "net/quic/quic_config.h"
23 #include "net/quic/quic_spdy_stream.h" 23 #include "net/quic/quic_spdy_stream.h"
24 #include "net/tools/balsa/balsa_headers.h" 24 #include "net/tools/balsa/balsa_headers.h"
25 #include "net/tools/epoll_server/epoll_server.h" 25 #include "net/tools/epoll_server/epoll_server.h"
26 #include "net/tools/quic/quic_client_base.h" 26 #include "net/tools/quic/quic_client_base.h"
27 #include "net/tools/quic/quic_client_session.h" 27 #include "net/tools/quic/quic_client_session.h"
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 int local_port_; 254 int local_port_;
255 255
256 // Listens for events on the client socket. 256 // Listens for events on the client socket.
257 EpollServer* epoll_server_; 257 EpollServer* epoll_server_;
258 258
259 // Map mapping created UDP sockets to their addresses. By using linked hash 259 // Map mapping created UDP sockets to their addresses. By using linked hash
260 // map, the order of socket creation can be recorded. 260 // map, the order of socket creation can be recorded.
261 linked_hash_map<int, IPEndPoint> fd_address_map_; 261 linked_hash_map<int, IPEndPoint> fd_address_map_;
262 262
263 // Listens for full responses. 263 // Listens for full responses.
264 scoped_ptr<ResponseListener> response_listener_; 264 std::unique_ptr<ResponseListener> response_listener_;
265 265
266 // Tracks if the client is initialized to connect. 266 // Tracks if the client is initialized to connect.
267 bool initialized_; 267 bool initialized_;
268 268
269 // If overflow_supported_ is true, this will be the number of packets dropped 269 // If overflow_supported_ is true, this will be the number of packets dropped
270 // during the lifetime of the server. 270 // during the lifetime of the server.
271 QuicPacketCount packets_dropped_; 271 QuicPacketCount packets_dropped_;
272 272
273 // True if the kernel supports SO_RXQ_OVFL, the number of packets dropped 273 // True if the kernel supports SO_RXQ_OVFL, the number of packets dropped
274 // because the socket would otherwise overflow. 274 // because the socket would otherwise overflow.
(...skipping 15 matching lines...) Expand all
290 290
291 // Once the client receives a stateless reject, keeps track of any data that 291 // Once the client receives a stateless reject, keeps track of any data that
292 // must be resent upon a subsequent successful connection. 292 // must be resent upon a subsequent successful connection.
293 std::vector<QuicDataToResend*> data_to_resend_on_connect_; 293 std::vector<QuicDataToResend*> data_to_resend_on_connect_;
294 294
295 // Point to a QuicPacketReader object on the heap. The reader allocates more 295 // Point to a QuicPacketReader object on the heap. The reader allocates more
296 // space than allowed on the stack. 296 // space than allowed on the stack.
297 // 297 //
298 // TODO(rtenneti): Chromium code doesn't use |packet_reader_|. Add support for 298 // TODO(rtenneti): Chromium code doesn't use |packet_reader_|. Add support for
299 // QuicPacketReader 299 // QuicPacketReader
300 scoped_ptr<QuicPacketReader> packet_reader_; 300 std::unique_ptr<QuicPacketReader> packet_reader_;
301 301
302 std::unique_ptr<ClientQuicDataToResend> push_promise_data_to_resend_; 302 std::unique_ptr<ClientQuicDataToResend> push_promise_data_to_resend_;
303 303
304 DISALLOW_COPY_AND_ASSIGN(QuicClient); 304 DISALLOW_COPY_AND_ASSIGN(QuicClient);
305 }; 305 };
306 306
307 } // namespace net 307 } // namespace net
308 308
309 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_H_ 309 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_H_
OLDNEW
« no previous file with comments | « net/tools/quic/end_to_end_test.cc ('k') | net/tools/quic/quic_client_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698