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

Unified Diff: webkit/dom_storage/dom_storage_types.h

Issue 12398008: Purge in-memory localStorage areas if the # of areas exceeds the limit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update Created 7 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: webkit/dom_storage/dom_storage_types.h
diff --git a/webkit/dom_storage/dom_storage_types.h b/webkit/dom_storage/dom_storage_types.h
index 180fb8043dfae553d6f2689463a81d1af83bfcfe..b449c10ff0e9e7e01a8533c2d606c8dc8aad0c18 100644
--- a/webkit/dom_storage/dom_storage_types.h
+++ b/webkit/dom_storage/dom_storage_types.h
@@ -30,6 +30,13 @@ const size_t kPerAreaOverQuotaAllowance = 100 * 1024;
// values for sessionstorage namespaces.
const int64 kLocalStorageNamespaceId = 0;
+// Max in-memory storage size. One profile (i.e. one DomStorageContext)
+// should not hold in-memory data more than this.
+// TODO(kinuko,michaeln): Consider calling DomStorageArea::PurgeMemory
+// at a reasonable timing to keep the in-memory cache size rather than
+// rejecting incoming requests.
+const size_t kMaxInMemoryAreaSize = 512 * 1024 * 1024;
+
const int64 kInvalidSessionStorageNamespaceId = kLocalStorageNamespaceId;
// Value to indicate an area that not be opened.
« webkit/dom_storage/dom_storage_context.cc ('K') | « webkit/dom_storage/dom_storage_namespace.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698