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

Side by Side Diff: net/disk_cache/simple/simple_test_util.h

Issue 2205073002: Simple Cache: validate lengths before allocations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 4 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_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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 const base::FilePath& cache_path); 44 const base::FilePath& cache_path);
45 45
46 // Removes the key SHA256 from an entry. 46 // Removes the key SHA256 from an entry.
47 bool RemoveKeySHA256FromEntry(const std::string& key, 47 bool RemoveKeySHA256FromEntry(const std::string& key,
48 const base::FilePath& cache_path); 48 const base::FilePath& cache_path);
49 49
50 // Modifies the key SHA256 from an entry so that it is corrupt. 50 // Modifies the key SHA256 from an entry so that it is corrupt.
51 bool CorruptKeySHA256FromEntry(const std::string& key, 51 bool CorruptKeySHA256FromEntry(const std::string& key,
52 const base::FilePath& cache_path); 52 const base::FilePath& cache_path);
53 53
54 // Modifies the stream 0 length field from an entry so it is invalid.
55 bool CorruptStream0LengthFromEntry(const std::string& key,
56 const base::FilePath& cache_path);
57
54 } // namespace simple_backend 58 } // namespace simple_backend
55 } // namespace disk_cache 59 } // namespace disk_cache
56 60
57 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_TEST_UTIL_H_ 61 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_TEST_UTIL_H_
OLDNEW
« no previous file with comments | « net/disk_cache/simple/simple_synchronous_entry.cc ('k') | net/disk_cache/simple/simple_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698