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

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

Issue 2004913002: SimpleCache: open with fewer seeks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 7 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 25 matching lines...) Expand all
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_
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