summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
authormichaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-25 00:34:32 +0000
committermichaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-25 00:34:32 +0000
commitdb4d4981a0089230ac88060d7c817e054de3f2e2 (patch)
tree2cfd032c1fdb6aece674d7a83d8a39ffeb410578 /webkit/glue
parent80c2915f7a7e3857b52fceb22fd7ce30a4e3ec20 (diff)
downloadchromium_src-db4d4981a0089230ac88060d7c817e054de3f2e2.zip
chromium_src-db4d4981a0089230ac88060d7c817e054de3f2e2.tar.gz
chromium_src-db4d4981a0089230ac88060d7c817e054de3f2e2.tar.bz2
Use the QuotaManager to determine the space available to WebSQLDatabases. Since activity outside of the database system now affect how much space is available, our strategy for informing the client side of the new limit needed to change. It's not enough to just send the new limit when a change within the DB system has occurred.
This change depends on a webkit/webcore change. https://bugs.webkit.org/show_bug.cgi?id=60985 In this CL the renderer will ask the browser for the limit when needed. But also in this CL are ipc plumbing additions to support notifying the renderer as changes occur. That plumbing will be utilized in a later CL. * [Chrome] DatabaseMessageFilter uses the QuotaManager respond to the SpaceAvailable query. * [DRT] SimpleDatabaseSystem uses quota_per_origin_ data member to respond to the SpaceAvailable query. * Mostly mind numbing plumbing for WebKit API additions. // Sync getter for use on webcore's background db threads to // call out to chrome to get the value. long long WebKitClient::databaseGetSpaceAvailableForOrigin(origin_identifier); // Split the existing updateDatabaseSize method into three methods. Chrome calls into these. static void WebDatabase::updateDatabaseSize(originIdentifier, dbname, spaceAvailable); static void WebDatabase::updateSpaceAvailable(originIdentifier, spaceAvailable); static void WebDatabase::resetSpaceAvailable(originIdentifier); Review URL: http://codereview.chromium.org/7037018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86537 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/webkitclient_impl.cc5
-rw-r--r--webkit/glue/webkitclient_impl.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/webkit/glue/webkitclient_impl.cc b/webkit/glue/webkitclient_impl.cc
index 4244bc3f..31c6b13 100644
--- a/webkit/glue/webkitclient_impl.cc
+++ b/webkit/glue/webkitclient_impl.cc
@@ -506,6 +506,11 @@ long long WebKitClientImpl::databaseGetFileSize(
return 0;
}
+long long WebKitClientImpl::databaseGetSpaceAvailableForOrigin(
+ const WebKit::WebString& origin_identifier) {
+ return 0;
+}
+
WebKit::WebString WebKitClientImpl::signedPublicKeyAndChallengeString(
unsigned key_size_index,
const WebKit::WebString& challenge,
diff --git a/webkit/glue/webkitclient_impl.h b/webkit/glue/webkitclient_impl.h
index 0f3765f..52a216b 100644
--- a/webkit/glue/webkitclient_impl.h
+++ b/webkit/glue/webkitclient_impl.h
@@ -36,6 +36,8 @@ class WebKitClientImpl : public WebKit::WebKitClient {
virtual long databaseGetFileAttributes(
const WebKit::WebString& vfs_file_name);
virtual long long databaseGetFileSize(const WebKit::WebString& vfs_file_name);
+ virtual long long databaseGetSpaceAvailableForOrigin(
+ const WebKit::WebString& origin_identifier);
virtual WebKit::WebString signedPublicKeyAndChallengeString(
unsigned key_size_index, const WebKit::WebString& challenge,
const WebKit::WebURL& url);