1 // Copyright 2012 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef NET_TOOLS_DUMP_CACHE_DUMP_FILES_H_ 6 #define NET_TOOLS_DUMP_CACHE_DUMP_FILES_H_ 7 8 // Performs basic inspection of the disk cache files with minimal disruption 9 // to the actual files (they still may change if an error is detected on the 10 // files). 11 12 #include "base/files/file_path.h" 13 14 // Check file version of the specified cache. 15 bool CheckFileVersion(const base::FilePath& input_path); 16 17 // Dumps all entries from the cache. 18 int DumpContents(const base::FilePath& input_path); 19 20 // Dumps the headers of all files. 21 int DumpHeaders(const base::FilePath& input_path); 22 23 // Dumps all lists of entries. 24 int DumpLists(const base::FilePath& input_path); 25 26 // Dumps a given entry. |at| can be the address of the entry, or the address of 27 // the rankings node, or just another block address to dump as data. 28 int DumpEntryAt(const base::FilePath& input_path, const std::string& at); 29 30 // Dumps the allocation bitmap of the given |file|. 31 int DumpAllocation(const base::FilePath& file); 32 33 #endif // NET_TOOLS_DUMP_CACHE_DUMP_FILES_H_ 34