summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/webkit/CallbackProxy.java11
-rw-r--r--core/java/android/webkit/WebChromeClient.java3
-rw-r--r--core/java/android/webkit/WebViewCore.java15
3 files changed, 19 insertions, 10 deletions
diff --git a/core/java/android/webkit/CallbackProxy.java b/core/java/android/webkit/CallbackProxy.java
index 6abf4c1..41e604d 100644
--- a/core/java/android/webkit/CallbackProxy.java
+++ b/core/java/android/webkit/CallbackProxy.java
@@ -434,12 +434,14 @@ class CallbackProxy extends Handler {
((Long) map.get("currentQuota")).longValue();
long totalUsedQuota =
((Long) map.get("totalUsedQuota")).longValue();
+ long estimatedSize =
+ ((Long) map.get("estimatedSize")).longValue();
WebStorage.QuotaUpdater quotaUpdater =
(WebStorage.QuotaUpdater) map.get("quotaUpdater");
mWebChromeClient.onExceededDatabaseQuota(url,
- databaseIdentifier, currentQuota, totalUsedQuota,
- quotaUpdater);
+ databaseIdentifier, currentQuota, estimatedSize,
+ totalUsedQuota, quotaUpdater);
}
break;
@@ -1195,6 +1197,7 @@ class CallbackProxy extends Handler {
* @param databaseIdentifier The identifier of the database that the
* transaction that caused the overflow was running on.
* @param currentQuota The current quota the origin is allowed.
+ * @param estimatedSize The estimated size of the database.
* @param totalUsedQuota is the sum of all origins' quota.
* @param quotaUpdater An instance of a class encapsulating a callback
* to WebViewCore to run when the decision to allow or deny more
@@ -1202,7 +1205,8 @@ class CallbackProxy extends Handler {
*/
public void onExceededDatabaseQuota(
String url, String databaseIdentifier, long currentQuota,
- long totalUsedQuota, WebStorage.QuotaUpdater quotaUpdater) {
+ long estimatedSize, long totalUsedQuota,
+ WebStorage.QuotaUpdater quotaUpdater) {
if (mWebChromeClient == null) {
quotaUpdater.updateQuota(currentQuota);
return;
@@ -1213,6 +1217,7 @@ class CallbackProxy extends Handler {
map.put("databaseIdentifier", databaseIdentifier);
map.put("url", url);
map.put("currentQuota", currentQuota);
+ map.put("estimatedSize", estimatedSize);
map.put("totalUsedQuota", totalUsedQuota);
map.put("quotaUpdater", quotaUpdater);
exceededQuota.obj = map;
diff --git a/core/java/android/webkit/WebChromeClient.java b/core/java/android/webkit/WebChromeClient.java
index e2d5d24..ad4ba05 100644
--- a/core/java/android/webkit/WebChromeClient.java
+++ b/core/java/android/webkit/WebChromeClient.java
@@ -215,13 +215,14 @@ public class WebChromeClient {
* @param databaseIdentifier The identifier of the database that caused the
* quota overflow.
* @param currentQuota The current quota for the origin.
+ * @param estimatedSize The estimated size of the database.
* @param totalUsedQuota is the sum of all origins' quota.
* @param quotaUpdater A callback to inform the WebCore thread that a new
* quota is available. This callback must always be executed at some
* point to ensure that the sleeping WebCore thread is woken up.
*/
public void onExceededDatabaseQuota(String url, String databaseIdentifier,
- long currentQuota, long totalUsedQuota,
+ long currentQuota, long estimatedSize, long totalUsedQuota,
WebStorage.QuotaUpdater quotaUpdater) {
// This default implementation passes the current quota back to WebCore.
// WebCore will interpret this that new quota was declined.
diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java
index d6a9cff..25cb249 100644
--- a/core/java/android/webkit/WebViewCore.java
+++ b/core/java/android/webkit/WebViewCore.java
@@ -258,20 +258,23 @@ final class WebViewCore {
* @param url The URL that caused the overflow.
* @param databaseIdentifier The identifier of the database.
* @param currentQuota The current quota for the origin.
+ * @param estimatedSize The estimated size of the database.
*/
protected void exceededDatabaseQuota(String url,
String databaseIdentifier,
- long currentQuota) {
+ long currentQuota,
+ long estimatedSize) {
// Inform the callback proxy of the quota overflow. Send an object
// that encapsulates a call to the nativeSetDatabaseQuota method to
// awaken the sleeping webcore thread when a decision from the
// client to allow or deny quota is available.
mCallbackProxy.onExceededDatabaseQuota(url, databaseIdentifier,
- currentQuota, getUsedQuota(), new WebStorage.QuotaUpdater() {
- public void updateQuota(long quota) {
- nativeSetNewStorageLimit(quota);
- }
- });
+ currentQuota, estimatedSize, getUsedQuota(),
+ new WebStorage.QuotaUpdater() {
+ public void updateQuota(long quota) {
+ nativeSetNewStorageLimit(quota);
+ }
+ });
}
/**