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

Unified Diff: content/browser/dom_storage/dom_storage_database.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: Fixes. 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_database.cc
diff --git a/content/browser/dom_storage/dom_storage_database.cc b/content/browser/dom_storage/dom_storage_database.cc
index b19dffa6c2fb947c499cc8cb854b3d388f8a0a06..88806a123ae0319879bbed8a8426d8925d04f137 100644
--- a/content/browser/dom_storage/dom_storage_database.cc
+++ b/content/browser/dom_storage/dom_storage_database.cc
@@ -128,6 +128,11 @@ bool DOMStorageDatabase::CommitChanges(bool clear_all_first,
return success;
}
+void DOMStorageDatabase::TrimMemory() {
+ if (IsOpen())
+ db_->TrimMemory(false /* aggressively */);
+}
+
bool DOMStorageDatabase::LazyOpen(bool create_if_needed) {
if (failed_to_open_) {
// Don't try to open a database that we know has failed

Powered by Google App Engine
This is Rietveld 408576698