OLD | NEW |
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_DISK_CACHE_SIMPLE_SIMPLE_TEST_UTIL_H_ | 5 #ifndef NET_DISK_CACHE_SIMPLE_SIMPLE_TEST_UTIL_H_ |
6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_TEST_UTIL_H_ | 6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_TEST_UTIL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 25 matching lines...) Expand all Loading... |
36 } | 36 } |
37 | 37 |
38 private: | 38 private: |
39 T data_[size]; | 39 T data_[size]; |
40 }; | 40 }; |
41 | 41 |
42 // Creates a corrupt file to be used in tests. | 42 // Creates a corrupt file to be used in tests. |
43 bool CreateCorruptFileForTests(const std::string& key, | 43 bool CreateCorruptFileForTests(const std::string& key, |
44 const base::FilePath& cache_path); | 44 const base::FilePath& cache_path); |
45 | 45 |
| 46 // Removes the key SHA256 from an entry. |
| 47 bool RemoveKeySHA256FromEntry(const std::string& key, |
| 48 const base::FilePath& cache_path); |
| 49 |
| 50 // Modifies the key SHA256 from an entry so that it is corrupt. |
| 51 bool CorruptKeySHA256FromEntry(const std::string& key, |
| 52 const base::FilePath& cache_path); |
| 53 |
46 } // namespace simple_backend | 54 } // namespace simple_backend |
47 } // namespace disk_cache | 55 } // namespace disk_cache |
48 | 56 |
49 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_TEST_UTIL_H_ | 57 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_TEST_UTIL_H_ |
OLD | NEW |