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/core/crypto/quic_crypto_server_config.cc b/quic/core/crypto/quic_crypto_server_config.cc
index e1386b4..ccb7691 100644
--- a/quic/core/crypto/quic_crypto_server_config.cc
+++ b/quic/core/crypto/quic_crypto_server_config.cc
@@ -340,11 +340,11 @@
   return config;
 }
 
-CryptoHandshakeMessage* QuicCryptoServerConfig::AddConfig(
+std::unique_ptr<CryptoHandshakeMessage> QuicCryptoServerConfig::AddConfig(
     std::unique_ptr<QuicServerConfigProtobuf> protobuf,
     const QuicWallTime now) {
-  std::unique_ptr<CryptoHandshakeMessage> msg(
-      CryptoFramer::ParseMessage(protobuf->config()));
+  std::unique_ptr<CryptoHandshakeMessage> msg =
+      CryptoFramer::ParseMessage(protobuf->config());
 
   if (!msg.get()) {
     QUIC_LOG(WARNING) << "Failed to parse server config message";
@@ -373,13 +373,13 @@
               primary_config_.get());
   }
 
-  return msg.release();
+  return msg;
 }
 
-CryptoHandshakeMessage* QuicCryptoServerConfig::AddDefaultConfig(
-    QuicRandom* rand,
-    const QuicClock* clock,
-    const ConfigOptions& options) {
+std::unique_ptr<CryptoHandshakeMessage>
+QuicCryptoServerConfig::AddDefaultConfig(QuicRandom* rand,
+                                         const QuicClock* clock,
+                                         const ConfigOptions& options) {
   return AddConfig(GenerateConfig(rand, clock, options), clock->WallNow());
 }