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

Side by Side Diff: net/quic/core/crypto/local_strike_register_client.h

Issue 2740453006: Add QuicStringPiece which is actually StringPiece. (Closed)
Patch Set: fix compile error and rebase Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_QUIC_CORE_CRYPTO_LOCAL_STRIKE_REGISTER_CLIENT_H_ 5 #ifndef NET_QUIC_CORE_CRYPTO_LOCAL_STRIKE_REGISTER_CLIENT_H_
6 #define NET_QUIC_CORE_CRYPTO_LOCAL_STRIKE_REGISTER_CLIENT_H_ 6 #define NET_QUIC_CORE_CRYPTO_LOCAL_STRIKE_REGISTER_CLIENT_H_
7 7
8 #include <cstdint> 8 #include <cstdint>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/strings/string_piece.h"
12 #include "net/quic/core/crypto/strike_register.h" 11 #include "net/quic/core/crypto/strike_register.h"
13 #include "net/quic/core/crypto/strike_register_client.h" 12 #include "net/quic/core/crypto/strike_register_client.h"
14 #include "net/quic/core/quic_time.h" 13 #include "net/quic/core/quic_time.h"
15 #include "net/quic/platform/api/quic_export.h" 14 #include "net/quic/platform/api/quic_export.h"
16 #include "net/quic/platform/api/quic_mutex.h" 15 #include "net/quic/platform/api/quic_mutex.h"
16 #include "net/quic/platform/api/quic_string_piece.h"
17 17
18 namespace net { 18 namespace net {
19 19
20 // StrikeRegisterClient implementation that wraps a local in-memory 20 // StrikeRegisterClient implementation that wraps a local in-memory
21 // strike register. 21 // strike register.
22 class QUIC_EXPORT_PRIVATE LocalStrikeRegisterClient 22 class QUIC_EXPORT_PRIVATE LocalStrikeRegisterClient
23 : public StrikeRegisterClient { 23 : public StrikeRegisterClient {
24 public: 24 public:
25 LocalStrikeRegisterClient(unsigned max_entries, 25 LocalStrikeRegisterClient(unsigned max_entries,
26 uint32_t current_time_external, 26 uint32_t current_time_external,
27 uint32_t window_secs, 27 uint32_t window_secs,
28 const uint8_t orbit[8], 28 const uint8_t orbit[8],
29 StrikeRegister::StartupType startup); 29 StrikeRegister::StartupType startup);
30 30
31 bool IsKnownOrbit(base::StringPiece orbit) const override; 31 bool IsKnownOrbit(QuicStringPiece orbit) const override;
32 void VerifyNonceIsValidAndUnique(base::StringPiece nonce, 32 void VerifyNonceIsValidAndUnique(QuicStringPiece nonce,
33 QuicWallTime now, 33 QuicWallTime now,
34 ResultCallback* cb) override; 34 ResultCallback* cb) override;
35 35
36 private: 36 private:
37 mutable QuicMutex m_; 37 mutable QuicMutex m_;
38 StrikeRegister strike_register_ GUARDED_BY(m_); 38 StrikeRegister strike_register_ GUARDED_BY(m_);
39 39
40 DISALLOW_COPY_AND_ASSIGN(LocalStrikeRegisterClient); 40 DISALLOW_COPY_AND_ASSIGN(LocalStrikeRegisterClient);
41 }; 41 };
42 42
43 } // namespace net 43 } // namespace net
44 44
45 #endif // NET_QUIC_CORE_CRYPTO_LOCAL_STRIKE_REGISTER_CLIENT_H_ 45 #endif // NET_QUIC_CORE_CRYPTO_LOCAL_STRIKE_REGISTER_CLIENT_H_
OLDNEW
« no previous file with comments | « net/quic/core/crypto/key_exchange.h ('k') | net/quic/core/crypto/local_strike_register_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698