| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 // This command-line program generates the set of files needed for the crash- | 5 // This command-line program generates the set of files needed for the crash- |
| 6 // cache unit tests (DiskCacheTest,CacheBackend_Recover*). This program only | 6 // cache unit tests (DiskCacheTest,CacheBackend_Recover*). This program only |
| 7 // works properly on debug mode, because the crash functionality is not compiled | 7 // works properly on debug mode, because the crash functionality is not compiled |
| 8 // on release builds of the cache. | 8 // on release builds of the cache. |
| 9 | 9 |
| 10 #include <windows.h> | 10 #include <windows.h> |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/at_exit.h" | 13 #include "base/at_exit.h" |
| 14 #include "base/file_util.h" | 14 #include "base/file_util.h" |
| 15 #include "base/logging.h" | 15 #include "base/logging.h" |
| 16 #include "base/message_loop.h" | 16 #include "base/message_loop.h" |
| 17 #include "base/path_service.h" | 17 #include "base/path_service.h" |
| 18 #include "base/string_util.h" | 18 #include "base/string_util.h" |
| 19 | 19 |
| 20 #include "net/disk_cache/backend_impl.h" | 20 #include "net/disk_cache/backend_impl.h" |
| 21 #include "net/disk_cache/disk_cache.h" | 21 #include "net/disk_cache/disk_cache.h" |
| 22 #include "net/disk_cache/disk_cache_test_util.h" | 22 #include "net/disk_cache/disk_cache_test_util.h" |
| 23 #include "net/disk_cache/rankings.h" | 23 #include "net/disk_cache/rankings.h" |
| 24 | 24 |
| 25 using base::Time; |
| 26 |
| 25 enum Errors { | 27 enum Errors { |
| 26 GENERIC = -1, | 28 GENERIC = -1, |
| 27 ALL_GOOD = 0, | 29 ALL_GOOD = 0, |
| 28 INVALID_ARGUMENT = 1, | 30 INVALID_ARGUMENT = 1, |
| 29 CRASH_OVERWRITE, | 31 CRASH_OVERWRITE, |
| 30 NOT_REACHED | 32 NOT_REACHED |
| 31 }; | 33 }; |
| 32 | 34 |
| 33 using disk_cache::RankCrashes; | 35 using disk_cache::RankCrashes; |
| 34 | 36 |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 std::wstring path; | 310 std::wstring path; |
| 309 PathService::Get(base::DIR_SOURCE_ROOT, &path); | 311 PathService::Get(base::DIR_SOURCE_ROOT, &path); |
| 310 file_util::AppendToPath(&path, L"net"); | 312 file_util::AppendToPath(&path, L"net"); |
| 311 file_util::AppendToPath(&path, L"data"); | 313 file_util::AppendToPath(&path, L"data"); |
| 312 file_util::AppendToPath(&path, L"cache_tests"); | 314 file_util::AppendToPath(&path, L"cache_tests"); |
| 313 file_util::AppendToPath(&path, L"new_crashes"); | 315 file_util::AppendToPath(&path, L"new_crashes"); |
| 314 | 316 |
| 315 return SlaveCode(path, action); | 317 return SlaveCode(path, action); |
| 316 } | 318 } |
| 317 | 319 |
| OLD | NEW |