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

Unified Diff: net/disk_cache/memory/mem_backend_impl.h

Issue 2784803004: [HTTP Cache] Prevent memory backend from exceeding its max size (Closed)
Patch Set: Nits Created 3 years, 9 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/memory/mem_backend_impl.h
diff --git a/net/disk_cache/memory/mem_backend_impl.h b/net/disk_cache/memory/mem_backend_impl.h
index 44937a0d54fe2eb1711a5d7d5232991916203b7e..cf8c998e5c9c3e762e22eadc6da3351365037823 100644
--- a/net/disk_cache/memory/mem_backend_impl.h
+++ b/net/disk_cache/memory/mem_backend_impl.h
@@ -73,6 +73,10 @@ class NET_EXPORT_PRIVATE MemBackendImpl final : public Backend {
// determine if eviction is neccessary and when eviction is finished.
void ModifyStorageSize(int32_t delta);
+ // Returns true if the cache's size is greater than the maximum allowed
+ // size.
+ bool HasExceededStorageSize() const;
+
// Backend interface.
net::CacheType GetCacheType() const override;
int32_t GetEntryCount() const override;

Powered by Google App Engine
This is Rietveld 408576698