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

Unified Diff: net/quic/core/crypto/quic_crypto_server_config_test.cc

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
« no previous file with comments | « net/quic/core/crypto/quic_crypto_server_config.cc ('k') | net/quic/core/quic_connection_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/crypto/quic_crypto_server_config_test.cc
diff --git a/net/quic/core/crypto/quic_crypto_server_config_test.cc b/net/quic/core/crypto/quic_crypto_server_config_test.cc
index 902adeca43dfef62f5784621c223d89b12a2890d..48763647761dca6fcbd3e218d382eb779d343150 100644
--- a/net/quic/core/crypto/quic_crypto_server_config_test.cc
+++ b/net/quic/core/crypto/quic_crypto_server_config_test.cc
@@ -8,7 +8,6 @@
#include <memory>
-#include "base/stl_util.h"
#include "net/quic/core/crypto/aes_128_gcm_12_encrypter.h"
#include "net/quic/core/crypto/cert_compressor.h"
#include "net/quic/core/crypto/chacha20_poly1305_encrypter.h"
@@ -399,7 +398,7 @@ class CryptoServerConfigsTest : public ::testing::Test {
bool has_invalid = false;
bool is_empty = true;
- vector<QuicServerConfigProtobuf*> protobufs;
+ vector<std::unique_ptr<QuicServerConfigProtobuf>> protobufs;
bool first = true;
for (;;) {
const char* server_config_id;
@@ -421,20 +420,19 @@ class CryptoServerConfigsTest : public ::testing::Test {
QuicCryptoServerConfig::ConfigOptions options;
options.id = server_config_id;
options.orbit = kOrbit;
- QuicServerConfigProtobuf* protobuf(
- QuicCryptoServerConfig::GenerateConfig(rand_, &clock_, options));
+ std::unique_ptr<QuicServerConfigProtobuf> protobuf =
+ QuicCryptoServerConfig::GenerateConfig(rand_, &clock_, options);
protobuf->set_primary_time(primary_time);
protobuf->set_priority(priority);
if (string(server_config_id).find("INVALID") == 0) {
protobuf->clear_key();
has_invalid = true;
}
- protobufs.push_back(protobuf);
+ protobufs.push_back(std::move(protobuf));
}
ASSERT_EQ(!has_invalid && !is_empty,
config_.SetConfigs(protobufs, clock_.WallNow()));
- base::STLDeleteElements(&protobufs);
}
protected:
« no previous file with comments | « net/quic/core/crypto/quic_crypto_server_config.cc ('k') | net/quic/core/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698