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

Unified Diff: net/disk_cache/cache_creator.cc

Issue 13731002: Cache Backend Proxy to intercept all cache events from the IO thread. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: added destructor Created 7 years, 8 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/cache_creator.cc
diff --git a/net/disk_cache/cache_creator.cc b/net/disk_cache/cache_creator.cc
index d8344a9a65b4dac976161aeb470d3bdd58329be2..b1a77dd22ef4485b1225bf64c798673fb56764d2 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
@@ -111,6 +115,9 @@ void CacheCreator::DoCallback(int result) {
created_cache_ = *backend_;
else
*backend_ = created_cache_;
+#ifdef USE_TRACING_CACHE_BACKEND
+ *backend_ = new disk_cache::TracingCacheBackend(*backend_);
+#endif
} else {
LOG(ERROR) << "Unable to create cache";
*backend_ = NULL;
@@ -160,5 +167,4 @@ int CreateCacheBackend(net::CacheType type, const base::FilePath& path,
return creator->Run();
}
-
} // namespace disk_cache

Powered by Google App Engine
This is Rietveld 408576698