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

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

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
Index: content/browser/dom_storage/local_storage_context_mojo.h
diff --git a/content/browser/dom_storage/local_storage_context_mojo.h b/content/browser/dom_storage/local_storage_context_mojo.h
index 90997500fe50007dcf2c67adcc836d368601806a..62257b85163f035c8168bfdc339457a9178f9d44 100644
--- a/content/browser/dom_storage/local_storage_context_mojo.h
+++ b/content/browser/dom_storage/local_storage_context_mojo.h
@@ -45,6 +45,10 @@ class CONTENT_EXPORT LocalStorageContextMojo {
void DeleteStorageForPhysicalOrigin(const url::Origin& origin);
void Flush();
+ // Clears any caches, to free up as much memory as possible. Next access to
+ // storage for a particular origin will reload the data from the database.
+ void PurgeMemory();
+
leveldb::mojom::LevelDBDatabaseAssociatedRequest DatabaseRequestForTesting();
private:
« no previous file with comments | « content/browser/dom_storage/dom_storage_context_wrapper.cc ('k') | content/browser/dom_storage/local_storage_context_mojo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698