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

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
===================================================================
--- net/disk_cache/disk_cache_test_base.cc (revision 188696)
+++ net/disk_cache/disk_cache_test_base.cc (working copy)
@@ -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"
@@ -67,6 +68,7 @@
if (mask_ || new_eviction_)
implementation_ = true;
+ // TODO(pasko,gavinp): run tests with Simple Cache as well.
if (memory_only_)
InitMemoryCache();
else
@@ -268,9 +270,10 @@
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