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

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

Issue 2589983002: Create a QUIC wrapper around scoped_refptr. (Closed)
Patch Set: rm = nullptr Created 4 years 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_compressed_certs_cache_test.cc
diff --git a/net/quic/core/crypto/quic_compressed_certs_cache_test.cc b/net/quic/core/crypto/quic_compressed_certs_cache_test.cc
index 1ac853a550ed310542ae8d0b07fdd7f6601a4b0c..456387e9bb65ac6305a8a3ed3c6514e54f10c882 100644
--- a/net/quic/core/crypto/quic_compressed_certs_cache_test.cc
+++ b/net/quic/core/crypto/quic_compressed_certs_cache_test.cc
@@ -30,7 +30,8 @@ class QuicCompressedCertsCacheTest : public testing::Test {
TEST_F(QuicCompressedCertsCacheTest, CacheHit) {
std::vector<string> certs = {"leaf cert", "intermediate cert", "root cert"};
- scoped_refptr<ProofSource::Chain> chain(new ProofSource::Chain(certs));
+ QuicReferenceCountedPointer<ProofSource::Chain> chain(
+ new ProofSource::Chain(certs));
string common_certs = "common certs";
string cached_certs = "cached certs";
string compressed = "compressed cert";
@@ -45,7 +46,8 @@ TEST_F(QuicCompressedCertsCacheTest, CacheHit) {
TEST_F(QuicCompressedCertsCacheTest, CacheMiss) {
std::vector<string> certs = {"leaf cert", "intermediate cert", "root cert"};
- scoped_refptr<ProofSource::Chain> chain(new ProofSource::Chain(certs));
+ QuicReferenceCountedPointer<ProofSource::Chain> chain(
+ new ProofSource::Chain(certs));
string common_certs = "common certs";
string cached_certs = "cached certs";
string compressed = "compressed cert";
@@ -56,7 +58,8 @@ TEST_F(QuicCompressedCertsCacheTest, CacheMiss) {
chain, "mismatched common certs", cached_certs));
EXPECT_EQ(nullptr, certs_cache_.GetCompressedCert(chain, common_certs,
"mismatched cached certs"));
- scoped_refptr<ProofSource::Chain> chain2(new ProofSource::Chain(certs));
+ QuicReferenceCountedPointer<ProofSource::Chain> chain2(
+ new ProofSource::Chain(certs));
EXPECT_EQ(nullptr,
certs_cache_.GetCompressedCert(chain2, common_certs, cached_certs));
}
@@ -65,7 +68,8 @@ TEST_F(QuicCompressedCertsCacheTest, CacheMissDueToEviction) {
// Test cache returns a miss when a queried uncompressed certs was cached but
// then evicted.
std::vector<string> certs = {"leaf cert", "intermediate cert", "root cert"};
- scoped_refptr<ProofSource::Chain> chain(new ProofSource::Chain(certs));
+ QuicReferenceCountedPointer<ProofSource::Chain> chain(
+ new ProofSource::Chain(certs));
string common_certs = "common certs";
string cached_certs = "cached certs";
« no previous file with comments | « net/quic/core/crypto/quic_compressed_certs_cache.cc ('k') | net/quic/core/crypto/quic_crypto_client_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698