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

Unified Diff: net/quic/crypto/local_strike_register_client.cc

Issue 113883003: - Add a priority field to QuicCryptoServerConfig configs and used it as (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 months 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/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 c375145039797fbdac37da16b42c78731b53c54f..1f78d9833d597b2414d714da5d0e74e25a119cf6 100644
--- a/net/quic/crypto/local_strike_register_client.cc
+++ b/net/quic/crypto/local_strike_register_client.cc
@@ -21,10 +21,12 @@ LocalStrikeRegisterClient::LocalStrikeRegisterClient(
orbit, startup) {
}
-string LocalStrikeRegisterClient::orbit() {
+bool LocalStrikeRegisterClient::IsKnownOrbit(StringPiece orbit) const {
base::AutoLock lock(m_);
- return string(reinterpret_cast<const char*>(strike_register_.orbit()),
- kOrbitSize);
+ if (orbit.length() != kOrbitSize) {
+ return false;
+ }
+ return memcmp(orbit.data(), strike_register_.orbit(), kOrbitSize) == 0;
}
void LocalStrikeRegisterClient::VerifyNonceIsValidAndUnique(
« no previous file with comments | « net/quic/crypto/local_strike_register_client.h ('k') | net/quic/crypto/local_strike_register_client_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698