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

Unified Diff: net/disk_cache/disk_cache_test_base.cc

Issue 12794003: Initialize the simple cache backend at runtime. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: . Created 7 years, 9 months 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
Index: net/disk_cache/disk_cache_test_base.cc
diff --git a/net/disk_cache/disk_cache_test_base.cc b/net/disk_cache/disk_cache_test_base.cc
index 296713dd0fc5fb1f25bb548abe86ca890260cd0f..224d9e7c1d3dff9cb30d64d67ddffb54fdd8ab6c 100644
--- a/net/disk_cache/disk_cache_test_base.cc
+++ b/net/disk_cache/disk_cache_test_base.cc
@@ -10,6 +10,7 @@
#include "net/base/net_errors.h"
#include "net/base/test_completion_callback.h"
#include "net/disk_cache/backend_impl.h"
+#include "net/disk_cache/disk_cache.h"
#include "net/disk_cache/disk_cache_test_util.h"
#include "net/disk_cache/mem_backend_impl.h"
@@ -260,6 +261,7 @@ void DiskCacheTestWithCache::InitDiskCache() {
}
ASSERT_TRUE(cache_thread_.message_loop() != NULL);
+ // TODO(pasko,gavinp): run tests with Simple Cache as well.
if (implementation_)
return InitDiskCacheImpl();
@@ -268,9 +270,10 @@ void DiskCacheTestWithCache::InitDiskCache() {
cache_thread_.message_loop_proxy();
net::TestCompletionCallback cb;
- int rv = disk_cache::BackendImpl::CreateBackend(
- cache_path_, force_creation_, size_, type_,
- disk_cache::kNoRandom, thread, NULL, &cache_, cb.callback());
+ int rv = disk_cache::CreateCacheBackendWithFlags(type_, cache_path_, size_,
+ force_creation_, disk_cache::kNoRandom, thread, NULL, &cache_,
+ cb.callback());
+
ASSERT_EQ(net::OK, cb.GetResult(rv));
}

Powered by Google App Engine
This is Rietveld 408576698