// Copyright 2012 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // This command-line program dumps the contents of a set of cache files, either // to stdout or to another set of cache files. #include <stdio.h> #include <string> #include "base/at_exit.h" #include "base/command_line.h" #include "base/i18n/icu_util.h" #include "base/strings/string_util.h" #include "net/disk_cache/blockfile/disk_format.h" #include "net/tools/dump_cache/dump_files.h" enum Errors { … }; // Dumps the file headers to stdout. const char kDumpHeaders[] = …; // Dumps all entries to stdout. const char kDumpContents[] = …; // Dumps the LRU lists(s). const char kDumpLists[] = …; // Dumps the entry at the given address (see kDumpAt). const char kDumpEntry[] = …; // The cache address to dump. const char kDumpAt[] = …; // Dumps the allocation bitmap of a file (see kDumpFile). const char kDumpAllocation[] = …; // The file to look at. const char kDumpFile[] = …; int Help() { … } // ----------------------------------------------------------------------- int main(int argc, const char* argv[]) { … }