summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorgavinp@chromium.org <gavinp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-07 02:46:24 +0000
committergavinp@chromium.org <gavinp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-07 02:46:24 +0000
commit9207c0fea6e10c8afb3dcaaa69d4f23d696ff4eb (patch)
tree1104a3b6ce6e83354cdfd45225160996e32d650b /net
parent3a87036165944282d5c44ce9c8aef71116d04959 (diff)
downloadchromium_src-9207c0fea6e10c8afb3dcaaa69d4f23d696ff4eb.zip
chromium_src-9207c0fea6e10c8afb3dcaaa69d4f23d696ff4eb.tar.gz
chromium_src-9207c0fea6e10c8afb3dcaaa69d4f23d696ff4eb.tar.bz2
Only use disk_cache::SimpleBackendImpl for net::DISK_CACHE (i.e. HTTP).
When gyp variable use_simple_cache_backend=1, only use the simple backend for HTTP cache. While it hopefully will eventually be suitable for use as other backends, testing now is focussed on the HTTP case. R=rvargas@chromium.org,pasko@chromium.org,felipeg@chromium.org BUG=173392 Review URL: https://chromiumcodereview.appspot.com/12288003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186596 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/disk_cache/backend_impl.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc
index ae08765..0b48c5a 100644
--- a/net/disk_cache/backend_impl.cc
+++ b/net/disk_cache/backend_impl.cc
@@ -272,12 +272,16 @@ int CreateCacheBackend(net::CacheType type, const base::FilePath& path,
DCHECK(thread);
#if defined(USE_SIMPLE_CACHE_BACKEND)
- return SimpleBackendImpl::CreateBackend(path, force, max_bytes, type, kNone,
- thread, net_log, backend, callback);
-#else
- return BackendImpl::CreateBackend(path, force, max_bytes, type, kNone, thread,
- net_log, backend, callback);
+ // TODO(gavinp,pasko): While simple backend development proceeds, we're only
+ // testing it against net::DISK_CACHE. Turn it on for more cache types as
+ // appropriate.
+ if (type == net::DISK_CACHE) {
+ return SimpleBackendImpl::CreateBackend(path, force, max_bytes, type, kNone,
+ thread, net_log, backend, callback);
+ }
#endif
+ return BackendImpl::CreateBackend(path, force, max_bytes, type, kNone,
+ thread, net_log, backend, callback);
}
// Returns the preferred maximum number of bytes for the cache given the