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

Unified Diff: net/quic/test_tools/quic_crypto_server_config_peer.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
« no previous file with comments | « net/quic/test_tools/quic_crypto_server_config_peer.h ('k') | net/quic/test_tools/quic_stream_peer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/test_tools/quic_crypto_server_config_peer.cc
diff --git a/net/quic/test_tools/quic_crypto_server_config_peer.cc b/net/quic/test_tools/quic_crypto_server_config_peer.cc
index 95a3c1b2271ab37ba056473b335f625a7b941230..3856b9f8e701d874a9c25cc9b739106a5dea0ed4 100644
--- a/net/quic/test_tools/quic_crypto_server_config_peer.cc
+++ b/net/quic/test_tools/quic_crypto_server_config_peer.cc
@@ -20,18 +20,18 @@ ProofSource* QuicCryptoServerConfigPeer::GetProofSource() {
return server_config_->proof_source_.get();
}
-scoped_refptr<QuicCryptoServerConfig::Config>
+QuicReferenceCountedPointer<QuicCryptoServerConfig::Config>
QuicCryptoServerConfigPeer::GetPrimaryConfig() {
QuicReaderMutexLock locked(&server_config_->configs_lock_);
- return scoped_refptr<QuicCryptoServerConfig::Config>(
+ return QuicReferenceCountedPointer<QuicCryptoServerConfig::Config>(
server_config_->primary_config_);
}
-scoped_refptr<QuicCryptoServerConfig::Config>
+QuicReferenceCountedPointer<QuicCryptoServerConfig::Config>
QuicCryptoServerConfigPeer::GetConfig(string config_id) {
QuicReaderMutexLock locked(&server_config_->configs_lock_);
if (config_id == "<primary>") {
- return scoped_refptr<QuicCryptoServerConfig::Config>(
+ return QuicReferenceCountedPointer<QuicCryptoServerConfig::Config>(
server_config_->primary_config_);
} else {
return server_config_->GetConfigWithScid(config_id);
@@ -124,8 +124,9 @@ void QuicCryptoServerConfigPeer::CheckConfigs(const char* server_config_id1,
ASSERT_EQ(expected.size(), server_config_->configs_.size()) << ConfigsDebug();
- for (const std::pair<const ServerConfigID,
- scoped_refptr<QuicCryptoServerConfig::Config>>& i :
+ for (const std::pair<
+ const ServerConfigID,
+ QuicReferenceCountedPointer<QuicCryptoServerConfig::Config>>& i :
server_config_->configs_) {
bool found = false;
for (std::pair<ServerConfigID, bool>& j : expected) {
@@ -152,7 +153,8 @@ string QuicCryptoServerConfigPeer::ConfigsDebug() {
string s;
for (const auto& i : server_config_->configs_) {
- const scoped_refptr<QuicCryptoServerConfig::Config> config = i.second;
+ const QuicReferenceCountedPointer<QuicCryptoServerConfig::Config> config =
+ i.second;
if (config->is_primary) {
s += "(primary) ";
} else {
@@ -173,7 +175,7 @@ void QuicCryptoServerConfigPeer::SelectNewPrimaryConfig(int seconds) {
string QuicCryptoServerConfigPeer::CompressChain(
QuicCompressedCertsCache* compressed_certs_cache,
- const scoped_refptr<ProofSource::Chain>& chain,
+ const QuicReferenceCountedPointer<ProofSource::Chain>& chain,
const string& client_common_set_hashes,
const string& client_cached_cert_hashes,
const CommonCertSets* common_sets) {
« no previous file with comments | « net/quic/test_tools/quic_crypto_server_config_peer.h ('k') | net/quic/test_tools/quic_stream_peer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698