Index: net/disk_cache/cache_creator.cc |
diff --git a/net/disk_cache/cache_creator.cc b/net/disk_cache/cache_creator.cc |
index 9a3a924a7f5a29bde5796597337141310145c061..c2c901f5f61e76507dcd97b8953c0c475e83b666 100644 |
--- a/net/disk_cache/cache_creator.cc |
+++ b/net/disk_cache/cache_creator.cc |
@@ -11,6 +11,10 @@ |
#include "net/disk_cache/mem_backend_impl.h" |
#include "net/disk_cache/simple/simple_backend_impl.h" |
+#ifdef USE_TRACING_CACHE_BACKEND |
+#include "net/disk_cache/tracing_cache_backend.h" |
+#endif |
+ |
namespace { |
// Builds an instance of the backend depending on platform, type, experiments |
@@ -102,9 +106,13 @@ int CacheCreator::Run() { |
void CacheCreator::DoCallback(int result) { |
DCHECK_NE(net::ERR_IO_PENDING, result); |
- if (result == net::OK) |
+ if (result == net::OK) { |
+#ifndef USE_TRACING_CACHE_BACKEND |
*backend_ = created_cache_; |
- else { |
+#else |
+ *backend_ = new disk_cache::TracingCacheBackend(created_cache_); |
+#endif |
+ } else { |
LOG(ERROR) << "Unable to create cache"; |
*backend_ = NULL; |
delete created_cache_; |