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

Unified Diff: net/quic/core/crypto/local_strike_register_client.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
Index: net/quic/core/crypto/local_strike_register_client.cc
diff --git a/net/quic/core/crypto/local_strike_register_client.cc b/net/quic/core/crypto/local_strike_register_client.cc
index bd70e0b320f34e9ef926a93afaa6165a57827334..1327818aaaf98116e8e437e1ebc54de66865eb8b 100644
--- a/net/quic/core/crypto/local_strike_register_client.cc
+++ b/net/quic/core/crypto/local_strike_register_client.cc
@@ -24,7 +24,7 @@ LocalStrikeRegisterClient::LocalStrikeRegisterClient(
startup) {}
bool LocalStrikeRegisterClient::IsKnownOrbit(StringPiece orbit) const {
- base::AutoLock lock(m_);
+ QuicWriterMutexLock lock(&m_);
if (orbit.length() != kOrbitSize) {
return false;
}
@@ -39,7 +39,7 @@ void LocalStrikeRegisterClient::VerifyNonceIsValidAndUnique(
if (nonce.length() != kNonceSize) {
nonce_error = NONCE_INVALID_FAILURE;
} else {
- base::AutoLock lock(m_);
+ QuicWriterMutexLock lock(&m_);
nonce_error =
strike_register_.Insert(reinterpret_cast<const uint8_t*>(nonce.data()),
static_cast<uint32_t>(now.ToUNIXSeconds()));
« no previous file with comments | « net/quic/core/crypto/local_strike_register_client.h ('k') | net/quic/core/crypto/quic_crypto_server_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698