Bug 48194 - [Qt] Add API for managing origin quotas in appcache
Summary: [Qt] Add API for managing origin quotas in appcache
Status: RESOLVED DUPLICATE of bug 43455
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: QtWebKit Unassigned
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2010-10-23 13:42 PDT by Robert Hogan
Modified: 2010-12-14 13:51 PST (History)
4 users (show)

See Also:


Attachments
Patch (14.02 KB, patch)
2010-10-23 14:01 PDT, Robert Hogan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Hogan 2010-10-23 13:42:48 PDT
Add the following API for managing cases where the application cache quota is exceeded in total or per origin.

+    \fn void QWebPage::applicationCacheQuotaExceeded(qint64 spaceNeeded);
+    \since 4.5
+
+    This signal is emitted whenever a web site is asking to store data
+    to the application cache and the maximum size allocated to the cache is exceeded.
+    A slot connected to this signal can decide whether to increase the maximum size
+    of the application cache with QWebSettings::setOfflineWebApplicationCacheQuota(qint64 maximumSize)
+    to prevent future failures.
+
+    \sa QWebDatabase
+*/
+
+/*!
+    \fn void QWebPage::applicationCacheQuotaPerOriginExceeded(QWebSecurityOrigin* origin);
+    \since 4.8
+
+    This signal is emitted whenever the web site from \a origin is asking to store data
+    to the application cache and the quota allocated to that \a origin is exceeded.
+    A slot connected to this signal can decide whether to increase the quota allocated
+    to the application cache for the \a origin with
+    QWebSecurityOrigin::setOfflineWebApplicationCacheQuota(qint64 quota).
+
+    \sa QWebDatabase
+*/
+

+    Sets the quota for the application cache in the security origin to \a quota bytes.
+
+    If the quota is set to a value less than the current usage, the quota will remain
+    and no data will be purged to meet the new quota. However, no new data can be added
+    to application caches with this origin.
+*/
+void QWebSecurityOrigin::setOfflineWebApplicationCacheQuota(qint64 quota)

+    \since 4.8
+
+    Sets the default maximum size of the cache for an offline web application
+    used by any given QWebSecurityOrigin to \a maximumSize.
+*/
+void QWebSettings::setOfflineWebApplicationCacheQuotaPerOrigin(qint64 maximumSize)

+
+/*!
+    \since 4.8
+
+    Returns the default maximum size of the cache for an offline web application
+    used by any given QWebSecurityOrigin.
+*/
+qint64 QWebSettings::offlineWebApplicationCacheQuotaPerOrigin()


Unskip http/tests/appcache/origin-quota.html
Comment 1 Robert Hogan 2010-10-23 14:01:48 PDT
Created attachment 71652 [details]
Patch
Comment 2 krithigassree.sambamurthy 2010-12-14 12:52:05 PST
This bug seems to be a duplicate of bug 43455 which was recently fixed.
Comment 3 Robert Hogan 2010-12-14 13:51:55 PST

*** This bug has been marked as a duplicate of bug 43455 ***