| Index: net/disk_cache/disk_cache_test_util.cc
|
| ===================================================================
|
| --- net/disk_cache/disk_cache_test_util.cc (revision 52189)
|
| +++ net/disk_cache/disk_cache_test_util.cc (working copy)
|
| @@ -77,6 +77,20 @@
|
| return true;
|
| }
|
|
|
| +bool CopyTestCache(const std::string& name) {
|
| + FilePath path;
|
| + PathService::Get(base::DIR_SOURCE_ROOT, &path);
|
| + path = path.AppendASCII("net");
|
| + path = path.AppendASCII("data");
|
| + path = path.AppendASCII("cache_tests");
|
| + path = path.AppendASCII(name);
|
| +
|
| + FilePath dest = GetCacheFilePath();
|
| + if (!DeleteCache(dest))
|
| + return false;
|
| + return file_util::CopyDirectory(path, dest, false);
|
| +}
|
| +
|
| bool CheckCacheIntegrity(const FilePath& path, bool new_eviction) {
|
| scoped_ptr<disk_cache::BackendImpl> cache(new disk_cache::BackendImpl(
|
| path, base::MessageLoopProxy::CreateForCurrentThread()));
|
|
|