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

Unified Diff: content/browser/dom_storage/dom_storage_host.cc

Issue 1953703004: Purge browser cache for dom storage in a smarter way (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dom_storage
Patch Set: Created 4 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/dom_storage/dom_storage_host.cc
diff --git a/content/browser/dom_storage/dom_storage_host.cc b/content/browser/dom_storage/dom_storage_host.cc
index 3db7d5a15ec774e21de3ed46a77a109b981beed7..3e666b2d7d71df7c6102b67ca563891081a4ecfa 100644
--- a/content/browser/dom_storage/dom_storage_host.cc
+++ b/content/browser/dom_storage/dom_storage_host.cc
@@ -55,11 +55,7 @@ bool DOMStorageHost::ExtractAreaValues(
if (!area->IsLoadedInMemory()) {
DOMStorageNamespace* ns = GetNamespace(connection_id);
DCHECK(ns);
- if (ns->CountInMemoryAreas() > kMaxInMemoryStorageAreas) {
- ns->PurgeMemory(DOMStorageNamespace::PURGE_UNOPENED);
- if (ns->CountInMemoryAreas() > kMaxInMemoryStorageAreas)
- ns->PurgeMemory(DOMStorageNamespace::PURGE_AGGRESSIVE);
- }
+ ns->PurgeMemory(DOMStorageNamespace::PURGE_UNSPECIFIED);
}
area->ExtractValues(map);
return true;

Powered by Google App Engine
This is Rietveld 408576698