Title: [138696] trunk/Source/WebKit/blackberry
Revision
138696
Author
commit-qu...@webkit.org
Date
2013-01-02 20:44:09 -0800 (Wed, 02 Jan 2013)

Log Message

[BlackBerry] Do not determine db quota limit using db file size
https://bugs.webkit.org/show_bug.cgi?id=105991

PR 267191

Patch by Otto Derek Cheung <otche...@rim.com> on 2013-01-02
Reviewed by George Staikos.

Passing the current quota to WebPageClientImpl::databaseQuota so we can determine a better
quota limit without using the db file size.

* Api/WebPageClient.h:
* WebCoreSupport/ChromeClientBlackBerry.cpp:
(WebCore::ChromeClientBlackBerry::exceededDatabaseQuota):

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/Api/WebPageClient.h (138695 => 138696)


--- trunk/Source/WebKit/blackberry/Api/WebPageClient.h	2013-01-03 04:39:01 UTC (rev 138695)
+++ trunk/Source/WebKit/blackberry/Api/WebPageClient.h	2013-01-03 04:44:09 UTC (rev 138696)
@@ -178,7 +178,7 @@
     virtual void scheduleCloseWindow() = 0;
 
     // Database interface.
-    virtual unsigned long long databaseQuota(const unsigned short* origin, unsigned originLength, const unsigned short* databaseName, unsigned databaseNameLength, unsigned long long totalUsage, unsigned long long originUsage, unsigned long long estimatedSize) = 0;
+    virtual unsigned long long databaseQuota(const unsigned short* origin, unsigned originLength, const unsigned short* databaseName, unsigned databaseNameLength, unsigned long long originUsage, unsigned long long currentQuota, unsigned long long estimatedSize) = 0;
 
     virtual void setIconForUrl(const BlackBerry::Platform::String& originalPageUrl, const BlackBerry::Platform::String& finalPageUrl, const BlackBerry::Platform::String& iconUrl) = 0;
     virtual void setFavicon(const BlackBerry::Platform::String& dataInBase64, const BlackBerry::Platform::String& url) = 0;

Modified: trunk/Source/WebKit/blackberry/ChangeLog (138695 => 138696)


--- trunk/Source/WebKit/blackberry/ChangeLog	2013-01-03 04:39:01 UTC (rev 138695)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2013-01-03 04:44:09 UTC (rev 138696)
@@ -1,3 +1,19 @@
+2013-01-02  Otto Derek Cheung  <otche...@rim.com>
+
+        [BlackBerry] Do not determine db quota limit using db file size
+        https://bugs.webkit.org/show_bug.cgi?id=105991
+
+        PR 267191
+
+        Reviewed by George Staikos.
+
+        Passing the current quota to WebPageClientImpl::databaseQuota so we can determine a better
+        quota limit without using the db file size.
+
+        * Api/WebPageClient.h:
+        * WebCoreSupport/ChromeClientBlackBerry.cpp:
+        (WebCore::ChromeClientBlackBerry::exceededDatabaseQuota):
+
 2013-01-02  Yong Li  <y...@rim.com>
 
         [BlackBerry] Cached frame shouldn't access the page when being destroyed

Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp (138695 => 138696)


--- trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp	2013-01-03 04:39:01 UTC (rev 138695)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp	2013-01-03 04:44:09 UTC (rev 138696)
@@ -498,8 +498,9 @@
 
     DatabaseManager& manager = DatabaseManager::manager();
 
-    unsigned long long totalUsage = manager.totalDatabaseUsage();
-    unsigned long long originUsage = manager.usageForOrigin(origin);
+    unsigned long long totalUsage = tracker.totalDatabaseUsage();
+    unsigned long long originUsage = tracker.usageForOrigin(origin);
+    unsigned long long currentQuota = tracker.quotaForOrigin(origin);
 
     DatabaseDetails details = manager.detailsForNameAndOrigin(name, origin);
     unsigned long long estimatedSize = details.expectedUsage();
@@ -508,7 +509,7 @@
     String originStr = origin->databaseIdentifier();
 
     unsigned long long quota = m_webPagePrivate->m_client->databaseQuota(originStr.characters(), originStr.length(),
-        nameStr.characters(), nameStr.length(), totalUsage, originUsage, estimatedSize);
+        nameStr.characters(), nameStr.length(), originUsage, currentQuota, estimatedSize);
 
     manager.setQuota(origin, quota);
 #endif
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to