#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include <string>
#include "base/at_exit.h"
#include "base/check.h"
#include "base/command_line.h"
#include "base/files/file_util.h"
#include "base/message_loop/message_pump_type.h"
#include "base/path_service.h"
#include "base/process/kill.h"
#include "base/process/launch.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/single_thread_task_executor.h"
#include "base/threading/thread.h"
#include "base/time/time.h"
#include "net/base/net_errors.h"
#include "net/base/net_export.h"
#include "net/base/test_completion_callback.h"
#include "net/disk_cache/backend_cleanup_tracker.h"
#include "net/disk_cache/blockfile/backend_impl.h"
#include "net/disk_cache/blockfile/rankings.h"
#include "net/disk_cache/disk_cache.h"
#include "net/disk_cache/disk_cache_test_util.h"
Time;
enum Errors { … };
RankCrashes;
int RunSlave(RankCrashes action) { … }
int MasterCode() { … }
namespace disk_cache {
NET_EXPORT_PRIVATE extern RankCrashes g_rankings_crash;
}
const char kCrashEntryName[] = …;
bool CreateTargetFolder(const base::FilePath& path, RankCrashes action,
base::FilePath* full_path) { … }
void FlushQueue(disk_cache::Backend* cache) { … }
bool CreateCache(const base::FilePath& path,
base::Thread* thread,
disk_cache::Backend** cache,
net::TestCompletionCallback* cb) { … }
int SimpleInsert(const base::FilePath& path, RankCrashes action,
base::Thread* cache_thread) { … }
int SimpleRemove(const base::FilePath& path, RankCrashes action,
base::Thread* cache_thread) { … }
int HeadRemove(const base::FilePath& path, RankCrashes action,
base::Thread* cache_thread) { … }
int LoadOperations(const base::FilePath& path, RankCrashes action,
base::Thread* cache_thread) { … }
int SlaveCode(const base::FilePath& path, RankCrashes action) { … }
int main(int argc, const char* argv[]) { … }