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

Unified Diff: net/quic/test_tools/quic_crypto_server_config_peer.cc

Issue 2561913003: Create a QUIC wrapper around a mutex and a mutex lock. (Closed)
Patch Set: fix 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/platform/impl/quic_mutex_impl.cc ('k') | net/tools/quic/quic_http_response_cache.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 46d282e0edfe61d0297958187eab50a02754104e..95a3c1b2271ab37ba056473b335f625a7b941230 100644
--- a/net/quic/test_tools/quic_crypto_server_config_peer.cc
+++ b/net/quic/test_tools/quic_crypto_server_config_peer.cc
@@ -22,14 +22,14 @@ ProofSource* QuicCryptoServerConfigPeer::GetProofSource() {
scoped_refptr<QuicCryptoServerConfig::Config>
QuicCryptoServerConfigPeer::GetPrimaryConfig() {
- base::AutoLock locked(server_config_->configs_lock_);
+ QuicReaderMutexLock locked(&server_config_->configs_lock_);
return scoped_refptr<QuicCryptoServerConfig::Config>(
server_config_->primary_config_);
}
scoped_refptr<QuicCryptoServerConfig::Config>
QuicCryptoServerConfigPeer::GetConfig(string config_id) {
- base::AutoLock locked(server_config_->configs_lock_);
+ QuicReaderMutexLock locked(&server_config_->configs_lock_);
if (config_id == "<primary>") {
return scoped_refptr<QuicCryptoServerConfig::Config>(
server_config_->primary_config_);
@@ -120,7 +120,7 @@ void QuicCryptoServerConfigPeer::CheckConfigs(const char* server_config_id1,
va_end(ap);
- base::AutoLock locked(server_config_->configs_lock_);
+ QuicReaderMutexLock locked(&server_config_->configs_lock_);
ASSERT_EQ(expected.size(), server_config_->configs_.size()) << ConfigsDebug();
@@ -166,7 +166,7 @@ string QuicCryptoServerConfigPeer::ConfigsDebug() {
}
void QuicCryptoServerConfigPeer::SelectNewPrimaryConfig(int seconds) {
- base::AutoLock locked(server_config_->configs_lock_);
+ QuicWriterMutexLock locked(&server_config_->configs_lock_);
server_config_->SelectNewPrimaryConfig(
QuicWallTime::FromUNIXSeconds(seconds));
}
« no previous file with comments | « net/quic/platform/impl/quic_mutex_impl.cc ('k') | net/tools/quic/quic_http_response_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698