Uniquify QuicCryptoServerConfig::Add[Default]Config
gfe-relnote: Use unique_ptr for memory management rather than bare pointer. No functional change intended, not flag-protected.
PiperOrigin-RevId: 238574036
Change-Id: I0bb803fb9d68925ecbfdf113ba70335a66b3f099
diff --git a/quic/test_tools/crypto_test_utils_test.cc b/quic/test_tools/crypto_test_utils_test.cc
index 19fdfbb..ff288d9 100644
--- a/quic/test_tools/crypto_test_utils_test.cc
+++ b/quic/test_tools/crypto_test_utils_test.cc
@@ -124,15 +124,15 @@
QuicCryptoServerConfig::ConfigOptions old_config_options;
old_config_options.id = "old-config-id";
- delete crypto_config.AddDefaultConfig(QuicRandom::GetInstance(), &clock,
- old_config_options);
+ crypto_config.AddDefaultConfig(QuicRandom::GetInstance(), &clock,
+ old_config_options);
QuicCryptoServerConfig::ConfigOptions new_config_options;
- std::unique_ptr<QuicServerConfigProtobuf> primary_config(
+ std::unique_ptr<QuicServerConfigProtobuf> primary_config =
crypto_config.GenerateConfig(QuicRandom::GetInstance(), &clock,
- new_config_options));
+ new_config_options);
primary_config->set_primary_time(clock.WallNow().ToUNIXSeconds());
- std::unique_ptr<CryptoHandshakeMessage> msg(
- crypto_config.AddConfig(std::move(primary_config), clock.WallNow()));
+ std::unique_ptr<CryptoHandshakeMessage> msg =
+ crypto_config.AddConfig(std::move(primary_config), clock.WallNow());
QuicStringPiece orbit;
ASSERT_TRUE(msg->GetStringPiece(kORBT, &orbit));
std::string nonce;