| Index: net/tools/crash_cache/crash_cache.cc
|
| diff --git a/net/tools/crash_cache/crash_cache.cc b/net/tools/crash_cache/crash_cache.cc
|
| index 3687bd94abe8e4e109223a394cf3e0a052853be4..1d39fa514e0ab649c2008e74c12f19d51fb95f5c 100644
|
| --- a/net/tools/crash_cache/crash_cache.cc
|
| +++ b/net/tools/crash_cache/crash_cache.cc
|
| @@ -88,33 +88,16 @@ NET_EXPORT_PRIVATE extern RankCrashes g_rankings_crash;
|
| const char* kCrashEntryName = "the first key";
|
|
|
| // Creates the destinaton folder for this run, and returns it on full_path.
|
| -bool CreateTargetFolder(const base::FilePath& path, RankCrashes action,
|
| +bool CreateTargetFolder(const base::FilePath& path,
|
| + RankCrashes action,
|
| base::FilePath* full_path) {
|
| const char* folders[] = {
|
| - "",
|
| - "insert_empty1",
|
| - "insert_empty2",
|
| - "insert_empty3",
|
| - "insert_one1",
|
| - "insert_one2",
|
| - "insert_one3",
|
| - "insert_load1",
|
| - "insert_load2",
|
| - "remove_one1",
|
| - "remove_one2",
|
| - "remove_one3",
|
| - "remove_one4",
|
| - "remove_head1",
|
| - "remove_head2",
|
| - "remove_head3",
|
| - "remove_head4",
|
| - "remove_tail1",
|
| - "remove_tail2",
|
| - "remove_tail3",
|
| - "remove_load1",
|
| - "remove_load2",
|
| - "remove_load3"
|
| - };
|
| + "", "insert_empty1", "insert_empty2", "insert_empty3",
|
| + "insert_one1", "insert_one2", "insert_one3", "insert_load1",
|
| + "insert_load2", "remove_one1", "remove_one2", "remove_one3",
|
| + "remove_one4", "remove_head1", "remove_head2", "remove_head3",
|
| + "remove_head4", "remove_tail1", "remove_tail2", "remove_tail3",
|
| + "remove_load1", "remove_load2", "remove_load3"};
|
| COMPILE_ASSERT(arraysize(folders) == disk_cache::MAX_CRASH, sync_folders);
|
| DCHECK(action > disk_cache::NO_CRASH && action < disk_cache::MAX_CRASH);
|
|
|
| @@ -129,9 +112,8 @@ bool CreateTargetFolder(const base::FilePath& path, RankCrashes action,
|
| // Makes sure that any pending task is processed.
|
| void FlushQueue(disk_cache::Backend* cache) {
|
| net::TestCompletionCallback cb;
|
| - int rv =
|
| - reinterpret_cast<disk_cache::BackendImpl*>(cache)->FlushQueueForTest(
|
| - cb.callback());
|
| + int rv = reinterpret_cast<disk_cache::BackendImpl*>(cache)
|
| + ->FlushQueueForTest(cb.callback());
|
| cb.GetResult(rv); // Ignore the result;
|
| }
|
|
|
| @@ -151,7 +133,8 @@ bool CreateCache(const base::FilePath& path,
|
| }
|
|
|
| // Generates the files for an empty and one item cache.
|
| -int SimpleInsert(const base::FilePath& path, RankCrashes action,
|
| +int SimpleInsert(const base::FilePath& path,
|
| + RankCrashes action,
|
| base::Thread* cache_thread) {
|
| net::TestCompletionCallback cb;
|
| disk_cache::Backend* cache;
|
| @@ -185,7 +168,8 @@ int SimpleInsert(const base::FilePath& path, RankCrashes action,
|
| }
|
|
|
| // Generates the files for a one item cache, and removing the head.
|
| -int SimpleRemove(const base::FilePath& path, RankCrashes action,
|
| +int SimpleRemove(const base::FilePath& path,
|
| + RankCrashes action,
|
| base::Thread* cache_thread) {
|
| DCHECK(action >= disk_cache::REMOVE_ONE_1);
|
| DCHECK(action <= disk_cache::REMOVE_TAIL_3);
|
| @@ -224,7 +208,8 @@ int SimpleRemove(const base::FilePath& path, RankCrashes action,
|
| return NOT_REACHED;
|
| }
|
|
|
| -int HeadRemove(const base::FilePath& path, RankCrashes action,
|
| +int HeadRemove(const base::FilePath& path,
|
| + RankCrashes action,
|
| base::Thread* cache_thread) {
|
| DCHECK(action >= disk_cache::REMOVE_HEAD_1);
|
| DCHECK(action <= disk_cache::REMOVE_HEAD_4);
|
| @@ -261,7 +246,8 @@ int HeadRemove(const base::FilePath& path, RankCrashes action,
|
| }
|
|
|
| // Generates the files for insertion and removals on heavy loaded caches.
|
| -int LoadOperations(const base::FilePath& path, RankCrashes action,
|
| +int LoadOperations(const base::FilePath& path,
|
| + RankCrashes action,
|
| base::Thread* cache_thread) {
|
| DCHECK(action >= disk_cache::INSERT_LOAD_1);
|
|
|
|
|