De-pointerize QuicServerConfigProtobuf variables
This CL converts a bunch of unique_ptr<QuicServerConfigProtobuf> objects to plain QuicServerConfigProtobuf. The extra indirection is not helping us here, and just introduces a bunch of "but what if it's null?" confusion. Especially since protobufs are moveable now, there's almost no performance implication to this change, and none of this code is in the serving path anyhow.
gfe-relnote: Use plain objects instead of unique_ptrs. No functional change intended, not flag-protected.
PiperOrigin-RevId: 239653446
Change-Id: I9007e89b33dfe201354d89fdbaa4d12c5d86fbed
diff --git a/quic/test_tools/crypto_test_utils.cc b/quic/test_tools/crypto_test_utils.cc
index 94ca8e1..66692bd 100644
--- a/quic/test_tools/crypto_test_utils.cc
+++ b/quic/test_tools/crypto_test_utils.cc
@@ -1008,10 +1008,9 @@
old_config_options.id = "old-config-id";
crypto_config->AddDefaultConfig(QuicRandom::GetInstance(), clock,
old_config_options);
- std::unique_ptr<QuicServerConfigProtobuf> primary_config =
- crypto_config->GenerateConfig(QuicRandom::GetInstance(), clock,
- new_config_options);
- primary_config->set_primary_time(clock->WallNow().ToUNIXSeconds());
+ QuicServerConfigProtobuf primary_config = crypto_config->GenerateConfig(
+ QuicRandom::GetInstance(), clock, 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());
QuicStringPiece orbit;