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

Side by Side Diff: net/tools/quic/quic_client_base.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/quic_client.h ('k') | net/tools/quic/quic_client_bin.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) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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 base class for the toy client, which connects to a specified port and sends 5 // A base class for the toy client, which connects to a specified port and sends
6 // QUIC request to that endpoint. 6 // QUIC request to that endpoint.
7 7
8 #ifndef NET_TOOLS_QUIC_QUIC_CLIENT_BASE_H_ 8 #ifndef NET_TOOLS_QUIC_QUIC_CLIENT_BASE_H_
9 #define NET_TOOLS_QUIC_QUIC_CLIENT_BASE_H_ 9 #define NET_TOOLS_QUIC_QUIC_CLIENT_BASE_H_
10 10
11 #include <memory>
11 #include <string> 12 #include <string>
12 13
13 #include "base/macros.h" 14 #include "base/macros.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "net/base/ip_endpoint.h" 15 #include "net/base/ip_endpoint.h"
16 #include "net/log/net_log.h" 16 #include "net/log/net_log.h"
17 #include "net/quic/crypto/crypto_handshake.h" 17 #include "net/quic/crypto/crypto_handshake.h"
18 #include "net/quic/crypto/quic_crypto_client_config.h" 18 #include "net/quic/crypto/quic_crypto_client_config.h"
19 #include "net/quic/quic_bandwidth.h" 19 #include "net/quic/quic_bandwidth.h"
20 #include "net/quic/quic_client_push_promise_index.h" 20 #include "net/quic/quic_client_push_promise_index.h"
21 #include "net/quic/quic_config.h" 21 #include "net/quic/quic_config.h"
22 #include "net/quic/quic_connection.h" 22 #include "net/quic/quic_connection.h"
23 #include "net/quic/quic_packet_writer.h" 23 #include "net/quic/quic_packet_writer.h"
24 #include "net/quic/quic_protocol.h" 24 #include "net/quic/quic_protocol.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 private: 192 private:
193 // |server_id_| is a tuple (hostname, port, is_https) of the server. 193 // |server_id_| is a tuple (hostname, port, is_https) of the server.
194 QuicServerId server_id_; 194 QuicServerId server_id_;
195 195
196 // config_ and crypto_config_ contain configuration and cached state about 196 // config_ and crypto_config_ contain configuration and cached state about
197 // servers. 197 // servers.
198 QuicConfig config_; 198 QuicConfig config_;
199 QuicCryptoClientConfig crypto_config_; 199 QuicCryptoClientConfig crypto_config_;
200 200
201 // Helper to be used by created connections. Needs to outlive |session_|. 201 // Helper to be used by created connections. Needs to outlive |session_|.
202 scoped_ptr<QuicConnectionHelperInterface> helper_; 202 std::unique_ptr<QuicConnectionHelperInterface> helper_;
203 203
204 // Writer used to actually send packets to the wire. Needs to outlive 204 // Writer used to actually send packets to the wire. Needs to outlive
205 // |session_|. 205 // |session_|.
206 scoped_ptr<QuicPacketWriter> writer_; 206 std::unique_ptr<QuicPacketWriter> writer_;
207 207
208 // Session which manages streams. 208 // Session which manages streams.
209 scoped_ptr<QuicClientSession> session_; 209 std::unique_ptr<QuicClientSession> session_;
210 210
211 // This vector contains QUIC versions which we currently support. 211 // This vector contains QUIC versions which we currently support.
212 // This should be ordered such that the highest supported version is the first 212 // This should be ordered such that the highest supported version is the first
213 // element, with subsequent elements in descending order (versions can be 213 // element, with subsequent elements in descending order (versions can be
214 // skipped as necessary). We will always pick supported_versions_[0] as the 214 // skipped as necessary). We will always pick supported_versions_[0] as the
215 // initial version to use. 215 // initial version to use.
216 QuicVersionVector supported_versions_; 216 QuicVersionVector supported_versions_;
217 217
218 // The initial value of maximum packet size of the connection. If set to 218 // The initial value of maximum packet size of the connection. If set to
219 // zero, the default is used. 219 // zero, the default is used.
(...skipping 21 matching lines...) Expand all
241 bool connected_or_attempting_connect_; 241 bool connected_or_attempting_connect_;
242 242
243 QuicClientPushPromiseIndex push_promise_index_; 243 QuicClientPushPromiseIndex push_promise_index_;
244 244
245 DISALLOW_COPY_AND_ASSIGN(QuicClientBase); 245 DISALLOW_COPY_AND_ASSIGN(QuicClientBase);
246 }; 246 };
247 247
248 } // namespace net 248 } // namespace net
249 249
250 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_BASE_H_ 250 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_BASE_H_
OLDNEW
« no previous file with comments | « net/tools/quic/quic_client.h ('k') | net/tools/quic/quic_client_bin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698