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

Unified Diff: webkit/dom_storage/dom_storage_cached_area.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: 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_cached_area.h
diff --git a/webkit/dom_storage/dom_storage_cached_area.h b/webkit/dom_storage/dom_storage_cached_area.h
index ae45a9c20bfd045f86e351a54bde0d60fd5d50ab..63e9dd65fd4ecd1c5e9aa05b6af4a02ac5e34a1e 100644
--- a/webkit/dom_storage/dom_storage_cached_area.h
+++ b/webkit/dom_storage/dom_storage_cached_area.h
@@ -28,7 +28,8 @@ class WEBKIT_STORAGE_EXPORT DomStorageCachedArea :
public base::RefCounted<DomStorageCachedArea> {
public:
DomStorageCachedArea(int64 namespace_id, const GURL& origin,
- DomStorageProxy* proxy);
+ DomStorageProxy* proxy,
+ int64 storage_size);
int64 namespace_id() const { return namespace_id_; }
const GURL& origin() const { return origin_; }
@@ -47,6 +48,10 @@ class WEBKIT_STORAGE_EXPORT DomStorageCachedArea :
size_t MemoryBytesUsedByCache() const;
+ void set_global_storage_size(int64 size) {
+ global_storage_size_ = size;
+ }
+
private:
friend class DomStorageCachedAreaTest;
friend class base::RefCounted<DomStorageCachedArea>;
@@ -83,6 +88,8 @@ class WEBKIT_STORAGE_EXPORT DomStorageCachedArea :
scoped_refptr<DomStorageMap> map_;
scoped_refptr<DomStorageProxy> proxy_;
base::WeakPtrFactory<DomStorageCachedArea> weak_factory_;
+
+ int64 global_storage_size_;
};
} // namespace dom_storage

Powered by Google App Engine
This is Rietveld 408576698