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

Unified Diff: content/browser/appcache/appcache_disk_cache.cc

Issue 1142193002: Revert of ServiceWorker: Use SimpleCache for the script cache (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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: content/browser/appcache/appcache_disk_cache.cc
diff --git a/content/browser/appcache/appcache_disk_cache.cc b/content/browser/appcache/appcache_disk_cache.cc
index 03d348c76bba246197ddaddad410ffccb63caa49..46f406eb6997c6815c25cd69fe669cae45799950 100644
--- a/content/browser/appcache/appcache_disk_cache.cc
+++ b/content/browser/appcache/appcache_disk_cache.cc
@@ -198,12 +198,8 @@
};
AppCacheDiskCache::AppCacheDiskCache()
-#if defined(APPCACHE_USE_SIMPLE_CACHE)
- : AppCacheDiskCache(true)
-#else
- : AppCacheDiskCache(false)
-#endif
-{
+ : is_disabled_(false),
+ weak_factory_(this) {
}
AppCacheDiskCache::~AppCacheDiskCache() {
@@ -308,12 +304,6 @@
return ActiveCall::DoomEntry(weak_factory_.GetWeakPtr(), key, callback);
}
-AppCacheDiskCache::AppCacheDiskCache(bool use_simple_cache)
- : use_simple_cache_(use_simple_cache),
- is_disabled_(false),
- weak_factory_(this) {
-}
-
AppCacheDiskCache::PendingCall::PendingCall()
: call_type(CREATE),
key(0),
@@ -343,10 +333,14 @@
is_disabled_ = false;
create_backend_callback_ = new CreateBackendCallbackShim(this);
+#if defined(APPCACHE_USE_SIMPLE_CACHE)
+ const net::BackendType backend_type = net::CACHE_BACKEND_SIMPLE;
+#else
+ const net::BackendType backend_type = net::CACHE_BACKEND_DEFAULT;
+#endif
int rv = disk_cache::CreateCacheBackend(
cache_type,
- use_simple_cache_ ? net::CACHE_BACKEND_SIMPLE
- : net::CACHE_BACKEND_DEFAULT,
+ backend_type,
cache_directory,
cache_size,
force,
« no previous file with comments | « content/browser/appcache/appcache_disk_cache.h ('k') | content/browser/service_worker/service_worker_disk_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698