summaryrefslogtreecommitdiffstats
path: root/WebKit/chromium/public/WebStorageNamespace.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/chromium/public/WebStorageNamespace.h')
-rw-r--r--WebKit/chromium/public/WebStorageNamespace.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/WebKit/chromium/public/WebStorageNamespace.h b/WebKit/chromium/public/WebStorageNamespace.h
index 4b648d4..51d4e0b 100644
--- a/WebKit/chromium/public/WebStorageNamespace.h
+++ b/WebKit/chromium/public/WebStorageNamespace.h
@@ -49,10 +49,14 @@ public:
// object when you're finished.
WEBKIT_API static WebStorageNamespace* createLocalStorageNamespace(const WebString& backingDirectoryPath, unsigned quota);
WEBKIT_API static WebStorageNamespace* createSessionStorageNamespace(unsigned quota);
- WEBKIT_API static WebStorageNamespace* createSessionStorageNamespace()
- {
- return createSessionStorageNamespace(noQuota);
- }
+
+ // The quota for each storage area. Suggested by the spec.
+ static const unsigned m_localStorageQuota = 5 * 1024 * 1024;
+
+ // Since SessionStorage memory is allocated in the browser process, we place a
+ // per-origin quota on it. Like LocalStorage there are known attacks against
+ // this, so it's more of a sanity check than a real security measure.
+ static const unsigned m_sessionStorageQuota = 5 * 1024 * 1024;
static const unsigned noQuota = UINT_MAX;