| Index: net/disk_cache/stress_cache.cc
|
| diff --git a/net/disk_cache/stress_cache.cc b/net/disk_cache/stress_cache.cc
|
| index 98dcbe1b079b8babf51e6ac11ca79316924865ea..51fda4c8fcd6dcd550e86d03ac49d149b9bdc559 100644
|
| --- a/net/disk_cache/stress_cache.cc
|
| +++ b/net/disk_cache/stress_cache.cc
|
| @@ -29,6 +29,7 @@
|
| #include "base/command_line.h"
|
| #include "base/debug_util.h"
|
| #include "base/file_path.h"
|
| +#include "base/file_util.h"
|
| #include "base/logging.h"
|
| #include "base/message_loop.h"
|
| #include "base/path_service.h"
|
| @@ -50,6 +51,16 @@ using base::Time;
|
| const int kError = -1;
|
| const int kExpectedCrash = 100;
|
|
|
| +FilePath GetStressCacheFilePath() {
|
| + FilePath path;
|
| + PathService::Get(base::DIR_TEMP, &path); // Ignore return value;
|
| + path = path.AppendASCII("cache_test_stress");
|
| + if (!file_util::PathExists(path))
|
| + file_util::CreateDirectory(path);
|
| +
|
| + return path;
|
| +}
|
| +
|
| // Starts a new process.
|
| int RunSlave(int iteration) {
|
| FilePath exe;
|
| @@ -92,7 +103,7 @@ int MasterCode() {
|
| // to know which instance of the application wrote them.
|
| void StressTheCache(int iteration) {
|
| int cache_size = 0x800000; // 8MB
|
| - FilePath path = GetCacheFilePath().InsertBeforeExtensionASCII("_stress");
|
| + FilePath path = GetStressCacheFilePath();
|
|
|
| base::Thread cache_thread("CacheThread");
|
| if (!cache_thread.StartWithOptions(
|
|
|