| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 is a simple application that stress-tests the crash recovery of the disk | 5 // This is a simple application that stress-tests the crash recovery of the disk |
| 6 // cache. The main application starts a copy of itself on a loop, checking the | 6 // cache. The main application starts a copy of itself on a loop, checking the |
| 7 // exit code of the child process. When the child dies in an unexpected way, | 7 // exit code of the child process. When the child dies in an unexpected way, |
| 8 // the main application quits. | 8 // the main application quits. |
| 9 | 9 |
| 10 // The child application has two threads: one to exercise the cache in an | 10 // The child application has two threads: one to exercise the cache in an |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 #include "base/command_line.h" | 29 #include "base/command_line.h" |
| 30 #include "base/debug/debugger.h" | 30 #include "base/debug/debugger.h" |
| 31 #include "base/file_path.h" | 31 #include "base/file_path.h" |
| 32 #include "base/logging.h" | 32 #include "base/logging.h" |
| 33 #include "base/message_loop.h" | 33 #include "base/message_loop.h" |
| 34 #include "base/path_service.h" | 34 #include "base/path_service.h" |
| 35 #include "base/platform_thread.h" | 35 #include "base/platform_thread.h" |
| 36 #include "base/process_util.h" | 36 #include "base/process_util.h" |
| 37 #include "base/string_number_conversions.h" | 37 #include "base/string_number_conversions.h" |
| 38 #include "base/string_util.h" | 38 #include "base/string_util.h" |
| 39 #include "base/thread.h" | 39 #include "base/threading/thread.h" |
| 40 #include "base/utf_string_conversions.h" | 40 #include "base/utf_string_conversions.h" |
| 41 #include "net/base/net_errors.h" | 41 #include "net/base/net_errors.h" |
| 42 #include "net/base/test_completion_callback.h" | 42 #include "net/base/test_completion_callback.h" |
| 43 #include "net/base/io_buffer.h" | 43 #include "net/base/io_buffer.h" |
| 44 #include "net/disk_cache/backend_impl.h" | 44 #include "net/disk_cache/backend_impl.h" |
| 45 #include "net/disk_cache/disk_cache.h" | 45 #include "net/disk_cache/disk_cache.h" |
| 46 #include "net/disk_cache/disk_cache_test_util.h" | 46 #include "net/disk_cache/disk_cache_test_util.h" |
| 47 | 47 |
| 48 using base::Time; | 48 using base::Time; |
| 49 | 49 |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 long int iteration = strtol(argv[1], &end, 0); | 235 long int iteration = strtol(argv[1], &end, 0); |
| 236 | 236 |
| 237 if (!StartCrashThread()) { | 237 if (!StartCrashThread()) { |
| 238 printf("failed to start thread\n"); | 238 printf("failed to start thread\n"); |
| 239 return kError; | 239 return kError; |
| 240 } | 240 } |
| 241 | 241 |
| 242 StressTheCache(iteration); | 242 StressTheCache(iteration); |
| 243 return 0; | 243 return 0; |
| 244 } | 244 } |
| OLD | NEW |