diff options
Diffstat (limited to 'WebKit/chromium/public/WebStorageNamespace.h')
-rw-r--r-- | WebKit/chromium/public/WebStorageNamespace.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/WebKit/chromium/public/WebStorageNamespace.h b/WebKit/chromium/public/WebStorageNamespace.h index da92a77..51d4e0b 100644 --- a/WebKit/chromium/public/WebStorageNamespace.h +++ b/WebKit/chromium/public/WebStorageNamespace.h @@ -48,7 +48,15 @@ public: // If path is empty, data will not persist. You should call delete on the returned // object when you're finished. WEBKIT_API static WebStorageNamespace* createLocalStorageNamespace(const WebString& backingDirectoryPath, unsigned quota); - WEBKIT_API static WebStorageNamespace* createSessionStorageNamespace(); + WEBKIT_API static WebStorageNamespace* createSessionStorageNamespace(unsigned quota); + + // 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; |