diff options
Diffstat (limited to 'net/disk_cache')
-rw-r--r-- | net/disk_cache/backend_impl.cc | 10 | ||||
-rw-r--r-- | net/disk_cache/histogram_macros.h | 3 |
2 files changed, 13 insertions, 0 deletions
diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc index 194a74e..534c33f 100644 --- a/net/disk_cache/backend_impl.cc +++ b/net/disk_cache/backend_impl.cc @@ -173,6 +173,16 @@ Backend* CreateCacheBackend(const FilePath& full_path, bool force, return BackendImpl::CreateBackend(full_path, force, max_bytes, type, kNone); } +int CreateCacheBackend(net::CacheType type, const FilePath& path, int max_bytes, + bool force, Backend** backend, + CompletionCallback* callback) { + if (type == net::MEMORY_CACHE) + *backend = CreateInMemoryCacheBackend(max_bytes); + else + *backend = BackendImpl::CreateBackend(path, force, max_bytes, type, kNone); + return *backend ? net::OK : net::ERR_FAILED; +} + int PreferedCacheSize(int64 available) { // If there is not enough space to use kDefaultCacheSize, use 80% of the // available space. diff --git a/net/disk_cache/histogram_macros.h b/net/disk_cache/histogram_macros.h index 27610f5..8d5966c 100644 --- a/net/disk_cache/histogram_macros.h +++ b/net/disk_cache/histogram_macros.h @@ -53,6 +53,9 @@ case net::MEDIA_CACHE:\ UMA_HISTOGRAM_##type(my_name.data(), sample);\ break;\ + case net::APP_CACHE:\ + UMA_HISTOGRAM_##type(my_name.data(), sample);\ + break;\ default:\ NOTREACHED();\ break;\ |