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

Unified Diff: net/quic/core/crypto/quic_crypto_server_config.h

Issue 2417023003: Remove stl_util's deletion functions from: (Closed)
Patch Set: internal snapshot 10 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 side-by-side diff with in-line comments
Download patch
Index: net/quic/core/crypto/quic_crypto_server_config.h
diff --git a/net/quic/core/crypto/quic_crypto_server_config.h b/net/quic/core/crypto/quic_crypto_server_config.h
index 354f1238cba02002f60fff669c6ee5d49b51a44b..76af4c51419714b4df4f123122727c475af938bc 100644
--- a/net/quic/core/crypto/quic_crypto_server_config.h
+++ b/net/quic/core/crypto/quic_crypto_server_config.h
@@ -210,17 +210,19 @@ class NET_EXPORT_PRIVATE QuicCryptoServerConfig {
// Generates a QuicServerConfigProtobuf protobuf suitable for
// AddConfig and SetConfigs.
- static QuicServerConfigProtobuf* GenerateConfig(QuicRandom* rand,
- const QuicClock* clock,
- const ConfigOptions& options);
+ static std::unique_ptr<QuicServerConfigProtobuf> GenerateConfig(
+ QuicRandom* rand,
+ const QuicClock* clock,
+ const ConfigOptions& options);
- // AddConfig adds a QuicServerConfigProtobuf to the availible configurations.
+ // AddConfig adds a QuicServerConfigProtobuf to the available configurations.
// It returns the SCFG message from the config if successful. The caller
// takes ownership of the CryptoHandshakeMessage. |now| is used in
// conjunction with |protobuf->primary_time()| to determine whether the
// config should be made primary.
- CryptoHandshakeMessage* AddConfig(QuicServerConfigProtobuf* protobuf,
- QuicWallTime now);
+ CryptoHandshakeMessage* AddConfig(
+ std::unique_ptr<QuicServerConfigProtobuf> protobuf,
+ QuicWallTime now);
// AddDefaultConfig calls DefaultConfig to create a config and then calls
// AddConfig to add it. See the comment for |DefaultConfig| for details of
@@ -236,8 +238,9 @@ class NET_EXPORT_PRIVATE QuicCryptoServerConfig {
// known, but are missing from the protobufs are deleted, unless they are
// currently the primary config. SetConfigs returns false if any errors were
// encountered and no changes to the QuicCryptoServerConfig will occur.
- bool SetConfigs(const std::vector<QuicServerConfigProtobuf*>& protobufs,
- QuicWallTime now);
+ bool SetConfigs(
+ const std::vector<std::unique_ptr<QuicServerConfigProtobuf>>& protobufs,
+ QuicWallTime now);
// SetSourceAddressTokenKeys sets the keys to be tried, in order, when
// decrypting a source address token. Note that these keys are used *without*
@@ -380,7 +383,7 @@ class NET_EXPORT_PRIVATE QuicCryptoServerConfig {
// per-connection.
void SetEphemeralKeySource(EphemeralKeySource* ephemeral_key_source);
- // Install an externall created StrikeRegisterClient for use to
+ // Install an externally created StrikeRegisterClient for use to
// interact with the strike register. This object takes ownership
// of the |strike_register_client|.
void SetStrikeRegisterClient(StrikeRegisterClient* strike_register_client);
@@ -479,7 +482,7 @@ class NET_EXPORT_PRIVATE QuicCryptoServerConfig {
// key_exchanges contains key exchange objects with the private keys
// already loaded. The values correspond, one-to-one, with the tags in
// |kexs| from the parent class.
- std::vector<KeyExchange*> key_exchanges;
+ std::vector<std::unique_ptr<KeyExchange>> key_exchanges;
// tag_value_map contains the raw key/value pairs for the config.
QuicTagValueMap tag_value_map;
@@ -634,7 +637,8 @@ class NET_EXPORT_PRIVATE QuicCryptoServerConfig {
// ParseConfigProtobuf parses the given config protobuf and returns a
// scoped_refptr<Config> if successful. The caller adopts the reference to the
// Config. On error, ParseConfigProtobuf returns nullptr.
- scoped_refptr<Config> ParseConfigProtobuf(QuicServerConfigProtobuf* protobuf);
+ scoped_refptr<Config> ParseConfigProtobuf(
+ const std::unique_ptr<QuicServerConfigProtobuf>& protobuf);
// NewSourceAddressToken returns a fresh source address token for the given
// IP address. |cached_network_params| is optional, and can be nullptr.
« no previous file with comments | « net/quic/core/crypto/quic_crypto_client_config.cc ('k') | net/quic/core/crypto/quic_crypto_server_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698