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

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

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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
deleted file mode 100644
index 71d222448f1ec2133d20604e9ce3d6f3a34f0e2e..0000000000000000000000000000000000000000
--- a/net/quic/crypto/local_strike_register_client.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "net/quic/crypto/local_strike_register_client.h"
-
-#include "net/quic/crypto/crypto_protocol.h"
-
-using base::StringPiece;
-using std::string;
-
-namespace net {
-
-LocalStrikeRegisterClient::LocalStrikeRegisterClient(
- unsigned max_entries,
- uint32 current_time_external,
- uint32 window_secs,
- const uint8 orbit[8],
- StrikeRegister::StartupType startup)
- : strike_register_(max_entries, current_time_external, window_secs,
- orbit, startup) {
-}
-
-bool LocalStrikeRegisterClient::IsKnownOrbit(StringPiece orbit) const {
- base::AutoLock lock(m_);
- if (orbit.length() != kOrbitSize) {
- return false;
- }
- return memcmp(orbit.data(), strike_register_.orbit(), kOrbitSize) == 0;
-}
-
-void LocalStrikeRegisterClient::VerifyNonceIsValidAndUnique(
- StringPiece nonce,
- QuicWallTime now,
- ResultCallback* cb) {
- InsertStatus nonce_error;
- if (nonce.length() != kNonceSize) {
- nonce_error = NONCE_INVALID_FAILURE;
- } else {
- base::AutoLock lock(m_);
- 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_error == NONCE_OK), nonce_error);
-}
-
-} // namespace net
« 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