Chromium Code Reviews| Index: net/quic/crypto/local_strike_register_client.cc |
| diff --git a/net/quic/crypto/local_strike_register_client.cc b/net/quic/crypto/local_strike_register_client.cc |
| index 1f78d9833d597b2414d714da5d0e74e25a119cf6..46e6dcf4c3960330fc5791ecd69f2a4deeeaeb1e 100644 |
| --- a/net/quic/crypto/local_strike_register_client.cc |
| +++ b/net/quic/crypto/local_strike_register_client.cc |
| @@ -30,19 +30,21 @@ bool LocalStrikeRegisterClient::IsKnownOrbit(StringPiece orbit) const { |
| } |
| void LocalStrikeRegisterClient::VerifyNonceIsValidAndUnique( |
| - StringPiece nonce, QuicWallTime now, ResultCallback* cb) { |
| - bool nonce_is_valid_and_unique; |
| + StringPiece nonce, |
| + QuicWallTime now, |
| + ResultCallback* cb) { |
| + InsertStatus nonce_error; |
| if (nonce.length() != kNonceSize) { |
| - nonce_is_valid_and_unique = false; |
| + nonce_error = NONCE_INVALID_FAILURE; |
| } else { |
| base::AutoLock lock(m_); |
| - nonce_is_valid_and_unique = strike_register_.Insert( |
| + nonce_error = strike_register_.Insert( |
| reinterpret_cast<const uint8*>(nonce.data()), |
| static_cast<uint32>(now.ToUNIXSeconds())); |
| } |
| // m_ must not be held when the ResultCallback runs. |
| - cb->Run(nonce_is_valid_and_unique); |
| + cb->Run((nonce_error == net::NONCE_OK), nonce_error); |
|
wtc
2014/07/14 21:52:28
Remove net::
ramant (doing other things)
2014/07/14 22:16:06
Done.
|
| } |
| } // namespace net |