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

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

Issue 2725723002: Purge new localstorage memory cache when under memory pressure. (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « content/browser/dom_storage/local_storage_context_mojo.h ('k') | content/browser/leveldb_wrapper_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/dom_storage/local_storage_context_mojo.cc
diff --git a/content/browser/dom_storage/local_storage_context_mojo.cc b/content/browser/dom_storage/local_storage_context_mojo.cc
index 6437963aa23a92dc79719816abeecb18bb79a33c..0469ec7e4db2a14d5507b54d4b6328dd2b7a769b 100644
--- a/content/browser/dom_storage/local_storage_context_mojo.cc
+++ b/content/browser/dom_storage/local_storage_context_mojo.cc
@@ -280,6 +280,11 @@ void LocalStorageContextMojo::Flush() {
it.second->level_db_wrapper()->ScheduleImmediateCommit();
}
+void LocalStorageContextMojo::PurgeMemory() {
+ for (const auto& it : level_db_wrappers_)
+ it.second->level_db_wrapper()->PurgeMemory();
+}
+
leveldb::mojom::LevelDBDatabaseAssociatedRequest
LocalStorageContextMojo::DatabaseRequestForTesting() {
DCHECK_EQ(connection_state_, NO_CONNECTION);
« no previous file with comments | « content/browser/dom_storage/local_storage_context_mojo.h ('k') | content/browser/leveldb_wrapper_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698