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

Unified Diff: net/disk_cache/backend_impl.cc

Issue 12192005: Add new simple disk cache backend. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase to trunk (::FilePath --> base::FilePath) Created 7 years, 11 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/backend_impl.cc
diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc
index e7fad5b9ffe8def36969239edca1ebe9a49d5541..851c30e5039c1724f4a23a3e11494dcfed1c84e0 100644
--- a/net/disk_cache/backend_impl.cc
+++ b/net/disk_cache/backend_impl.cc
@@ -28,6 +28,7 @@
#include "net/disk_cache/experiments.h"
#include "net/disk_cache/file.h"
#include "net/disk_cache/mem_backend_impl.h"
+#include "net/disk_cache/very_simple/very_simple_backend_impl.h"
// This has to be defined before including histogram_macros.h from this file.
#define NET_DISK_CACHE_BACKEND_IMPL_CC_
@@ -266,8 +267,13 @@ int CreateCacheBackend(net::CacheType type, const FilePath& path, int max_bytes,
}
DCHECK(thread);
+#if defined(USE_VERY_SIMPLE_BACKEND)
+ return VerySimpleBackendImpl::BackendFactory(path).
pasko-google - do not use 2013/02/05 21:20:33 This discards logic of the CacheCreator that, whet
gavinp 2013/02/08 23:17:51 I think this is a good idea. And I think that this
+ CreateBackend(net_log, backend, callback);
rvargas (doing something else) 2013/02/06 03:28:40 - Why is this split in two? (build factory + Creat
gavinp 2013/02/08 23:17:51 Done.
+#else
return BackendImpl::CreateBackend(path, force, max_bytes, type, kNone, thread,
net_log, backend, callback);
+#endif
}
// Returns the preferred maximum number of bytes for the cache given the

Powered by Google App Engine
This is Rietveld 408576698