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

Unified Diff: net/quic/crypto/strike_register_client.h

Issue 388333005: Reject reasons from strike register when nonce validation fails. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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/strike_register_client.h
diff --git a/net/quic/crypto/strike_register_client.h b/net/quic/crypto/strike_register_client.h
index e37827a899d1577dedd7679bdedc3425d1fdd5b0..dae35197a364557d04f4dce8dfddbf4065805dba 100644
--- a/net/quic/crypto/strike_register_client.h
+++ b/net/quic/crypto/strike_register_client.h
@@ -10,6 +10,7 @@
#include "base/basictypes.h"
#include "base/strings/string_piece.h"
#include "net/base/net_export.h"
+#include "net/quic/crypto/strike_register.h"
#include "net/quic/quic_time.h"
namespace net {
@@ -24,13 +25,14 @@ class NET_EXPORT_PRIVATE StrikeRegisterClient {
public:
ResultCallback() {}
virtual ~ResultCallback() {}
- void Run(bool nonce_is_valid_and_unique) {
- RunImpl(nonce_is_valid_and_unique);
+ void Run(bool nonce_is_valid_and_unique, InsertStatus nonce_error) {
+ RunImpl(nonce_is_valid_and_unique, nonce_error);
delete this;
}
protected:
- virtual void RunImpl(bool nonce_is_valid_and_unique) = 0;
+ virtual void RunImpl(bool nonce_is_valid_and_unique,
+ InsertStatus nonce_error) = 0;
private:
DISALLOW_COPY_AND_ASSIGN(ResultCallback);
@@ -42,7 +44,8 @@ class NET_EXPORT_PRIVATE StrikeRegisterClient {
// Returns true iff the strike register knows about the given orbit.
virtual bool IsKnownOrbit(base::StringPiece orbit) const = 0;
// Validate a nonce for freshness and uniqueness.
- // Will invoke cb->Run(ValidateResponse::nonce_is_valid_and_unique())
+ // Will invoke cb->Run(ValidateResponse::nonce_is_valid_and_unique(),
+ // ValidateResponse::nonce_error())
// once the asynchronous operation is complete.
virtual void VerifyNonceIsValidAndUnique(
base::StringPiece nonce,

Powered by Google App Engine
This is Rietveld 408576698