Index: net/disk_cache/stress_cache.cc |
=================================================================== |
--- net/disk_cache/stress_cache.cc (revision 151735) |
+++ net/disk_cache/stress_cache.cc (working copy) |
@@ -26,6 +26,7 @@ |
#include "base/message_loop.h" |
#include "base/path_service.h" |
#include "base/process_util.h" |
+#include "base/scoped_temp_dir.h" |
#include "base/string_number_conversions.h" |
#include "base/string_util.h" |
#include "base/threading/platform_thread.h" |
@@ -101,7 +102,8 @@ |
void StressTheCache(int iteration) { |
int cache_size = 0x2000000; // 32MB. |
uint32 mask = 0xfff; // 4096 entries. |
- FilePath path = GetCacheFilePath().InsertBeforeExtensionASCII("_stress"); |
+ ScopedTempDir path; |
+ CHECK(path.CreateUniqueTempDir()); |
rvargas (doing something else)
2012/08/16 21:04:19
This should definitely not be a random folder.
jam
2012/08/16 21:33:03
ah, thanks, I didn't read this test closely enough
|
base::Thread cache_thread("CacheThread"); |
if (!cache_thread.StartWithOptions( |
@@ -109,8 +111,8 @@ |
return; |
disk_cache::BackendImpl* cache = |
- new disk_cache::BackendImpl(path, mask, cache_thread.message_loop_proxy(), |
- NULL); |
+ new disk_cache::BackendImpl(path.path(), mask, |
+ cache_thread.message_loop_proxy(), NULL); |
cache->SetMaxSize(cache_size); |
cache->SetFlags(disk_cache::kNoLoadProtection); |