| Index: net/disk_cache/disk_cache_test_util.h
|
| diff --git a/net/disk_cache/disk_cache_test_util.h b/net/disk_cache/disk_cache_test_util.h
|
| index f6348e9ada7aac785c24cbc6bc9b867d4f24de24..f4864bb88075e72f1598c0ade8382adf5a991e76 100644
|
| --- a/net/disk_cache/disk_cache_test_util.h
|
| +++ b/net/disk_cache/disk_cache_test_util.h
|
| @@ -11,6 +11,7 @@
|
| #include "base/callback.h"
|
| #include "base/file_path.h"
|
| #include "base/message_loop.h"
|
| +#include "base/scoped_temp_dir.h"
|
| #include "base/timer.h"
|
| #include "build/build_config.h"
|
|
|
| @@ -20,11 +21,8 @@ bool CreateCacheTestFile(const FilePath& name);
|
| // Deletes all file son the cache.
|
| bool DeleteCache(const FilePath& path);
|
|
|
| -// Copies a set of cache files from the data folder to the test folder.
|
| -bool CopyTestCache(const std::string& name);
|
| -
|
| -// Gets the path to the cache test folder.
|
| -FilePath GetCacheFilePath();
|
| +// Copies a set of cache files from the data folder to the destination folder.
|
| +bool CopyTestCache(const std::string& name, const FilePath& destination);
|
|
|
| // Fills buffer with random values (may contain nulls unless no_nulls is true).
|
| void CacheTestFillBuffer(char* buffer, size_t len, bool no_nulls);
|
| @@ -40,14 +38,12 @@ bool CheckCacheIntegrity(const FilePath& path, bool new_eviction);
|
| class ScopedTestCache {
|
| public:
|
| ScopedTestCache();
|
| - // Use a specific folder name.
|
| - explicit ScopedTestCache(const std::string& name);
|
| ~ScopedTestCache();
|
|
|
| - FilePath path() const { return path_; }
|
| + FilePath path() const { return temp_dir_.path(); }
|
|
|
| private:
|
| - const FilePath path_; // Path to the cache test folder.
|
| + ScopedTempDir temp_dir_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ScopedTestCache);
|
| };
|
|
|