OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_NACL_HOST_NACL_VALIDATION_CACHE_H_ | 5 #ifndef CHROME_BROWSER_NACL_HOST_NACL_VALIDATION_CACHE_H_ |
6 #define CHROME_BROWSER_NACL_HOST_NACL_VALIDATION_CACHE_H_ | 6 #define CHROME_BROWSER_NACL_HOST_NACL_VALIDATION_CACHE_H_ |
7 | 7 |
8 #include "base/containers/mru_cache.h" | 8 #include "base/containers/mru_cache.h" |
9 | 9 |
| 10 #include <vector> |
| 11 |
10 class Pickle; | 12 class Pickle; |
11 | 13 |
12 class NaClValidationCache { | 14 class NaClValidationCache { |
13 public: | 15 public: |
14 NaClValidationCache(); | 16 NaClValidationCache(); |
15 ~NaClValidationCache(); | 17 ~NaClValidationCache(); |
16 | 18 |
17 // Get the key used for HMACing validation signatures. This should be a | 19 // Get the key used for HMACing validation signatures. This should be a |
18 // string of cryptographically secure random bytes. | 20 // string of cryptographically secure random bytes. |
19 const std::string& GetValidationCacheKey() const { | 21 const std::string& GetValidationCacheKey() const { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 | 55 |
54 typedef base::HashingMRUCache<std::string, bool> ValidationCacheType; | 56 typedef base::HashingMRUCache<std::string, bool> ValidationCacheType; |
55 ValidationCacheType validation_cache_; | 57 ValidationCacheType validation_cache_; |
56 | 58 |
57 std::string validation_cache_key_; | 59 std::string validation_cache_key_; |
58 | 60 |
59 DISALLOW_COPY_AND_ASSIGN(NaClValidationCache); | 61 DISALLOW_COPY_AND_ASSIGN(NaClValidationCache); |
60 }; | 62 }; |
61 | 63 |
62 #endif // CHROME_BROWSER_NACL_HOST_NACL_VALIDATION_CACHE_H_ | 64 #endif // CHROME_BROWSER_NACL_HOST_NACL_VALIDATION_CACHE_H_ |
OLD | NEW |