Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(716)

Unified Diff: net/disk_cache/disk_cache_test_util.cc

Issue 8463031: Disk cache: Simplyfy some of the test infrastructure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/disk_cache/disk_cache_test_util.h ('k') | net/disk_cache/mapped_file_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/disk_cache_test_util.cc
===================================================================
--- net/disk_cache/disk_cache_test_util.cc (revision 109713)
+++ net/disk_cache/disk_cache_test_util.cc (working copy)
@@ -78,20 +78,6 @@
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, uint32 mask) {
scoped_ptr<disk_cache::BackendImpl> cache(new disk_cache::BackendImpl(
path, mask, base::MessageLoopProxy::current(), NULL));
@@ -105,7 +91,7 @@
return cache->SelfCheck() >= 0;
}
-ScopedTestCache::ScopedTestCache() : path_(GetCacheFilePath()) {
+ScopedTestCache::ScopedTestCache(const FilePath& path) : path_(path) {
bool result = DeleteCache(path_);
DCHECK(result);
}
« no previous file with comments | « net/disk_cache/disk_cache_test_util.h ('k') | net/disk_cache/mapped_file_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698