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

Unified Diff: net/disk_cache/cache_creator.cc

Issue 117533003: Make the blockfile cache an optional build product for chrome target. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: default value Created 6 years, 12 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
« no previous file with comments | « no previous file | net/net.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/cache_creator.cc
diff --git a/net/disk_cache/cache_creator.cc b/net/disk_cache/cache_creator.cc
index 102e10218abe3f8941b7dac5c79340199fa1be42..23ff396f302169331ff7c13dd4b65c0cc3d8fe7e 100644
--- a/net/disk_cache/cache_creator.cc
+++ b/net/disk_cache/cache_creator.cc
@@ -7,12 +7,15 @@
#include "base/strings/stringprintf.h"
#include "net/base/cache_type.h"
#include "net/base/net_errors.h"
-#include "net/disk_cache/blockfile/backend_impl.h"
#include "net/disk_cache/cache_util.h"
#include "net/disk_cache/disk_cache.h"
#include "net/disk_cache/memory/mem_backend_impl.h"
#include "net/disk_cache/simple/simple_backend_impl.h"
+#ifdef USE_BLOCKFILE_CACHE_BACKEND
rvargas (doing something else) 2014/01/03 19:56:13 Can we use OS_ANDROID here? Having too many knobs
gavinp 2014/02/05 20:54:13 If we use OS_ANDROID here, the expression will be
rvargas (doing something else) 2014/02/06 05:09:28 The number of references seem the same regardless
+#include "net/disk_cache/blockfile/backend_impl.h"
+#endif
+
#ifdef USE_TRACING_CACHE_BACKEND
#include "net/disk_cache/tracing_cache_backend.h"
#endif
@@ -91,6 +94,8 @@ int CacheCreator::Run() {
return simple_cache->Init(
base::Bind(&CacheCreator::OnIOComplete, base::Unretained(this)));
}
+
+#if defined(USE_BLOCKFILE_CACHE_BACKEND)
disk_cache::BackendImpl* new_cache =
new disk_cache::BackendImpl(path_, thread_.get(), net_log_);
created_cache_.reset(new_cache);
@@ -101,6 +106,9 @@ int CacheCreator::Run() {
base::Bind(&CacheCreator::OnIOComplete, base::Unretained(this)));
DCHECK_EQ(net::ERR_IO_PENDING, rv);
return rv;
+#else
+ return net::ERR_FAILED;
+#endif
}
void CacheCreator::DoCallback(int result) {
« no previous file with comments | « no previous file | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698