summaryrefslogtreecommitdiffstats
path: root/content/worker
diff options
context:
space:
mode:
authorkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-23 05:25:07 +0000
committerkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-23 05:25:07 +0000
commitb469e8b4fa943d5e1fca0fc42bb373d49db116d1 (patch)
tree2029d90e075a3276232ef3e62f0561b5a93d5538 /content/worker
parent68c550cfef163553d89a1d0914b2e9049fd30cee (diff)
downloadchromium_src-b469e8b4fa943d5e1fca0fc42bb373d49db116d1.zip
chromium_src-b469e8b4fa943d5e1fca0fc42bb373d49db116d1.tar.gz
chromium_src-b469e8b4fa943d5e1fca0fc42bb373d49db116d1.tar.bz2
Implement WebKit::Platform::queryStorageUsageAndQuota
We used to have the same method on RenderViewImpl (WebFrameClient), but are moving the impl to platform layer. (Corresponding Blink API change is: https://src.chromium.org/viewvc/blink?revision=154473&view=revision) BUG=259660 TEST=no behavioral change NOTRY=true Review URL: https://chromiumcodereview.appspot.com/19592004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213043 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/worker')
-rw-r--r--content/worker/worker_webkitplatformsupport_impl.cc12
-rw-r--r--content/worker/worker_webkitplatformsupport_impl.h4
2 files changed, 16 insertions, 0 deletions
diff --git a/content/worker/worker_webkitplatformsupport_impl.cc b/content/worker/worker_webkitplatformsupport_impl.cc
index d290fe5..9832a42 100644
--- a/content/worker/worker_webkitplatformsupport_impl.cc
+++ b/content/worker/worker_webkitplatformsupport_impl.cc
@@ -12,6 +12,7 @@
#include "content/child/database_util.h"
#include "content/child/fileapi/webfilesystem_impl.h"
#include "content/child/indexed_db/proxy_webidbfactory_impl.h"
+#include "content/child/quota_dispatcher.h"
#include "content/child/thread_safe_sender.h"
#include "content/child/webblobregistry_impl.h"
#include "content/child/webmessageportchannel_impl.h"
@@ -24,6 +25,7 @@
#include "third_party/WebKit/public/platform/WebFileInfo.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/platform/WebURL.h"
+#include "webkit/common/quota/quota_types.h"
#include "webkit/glue/webfileutilities_impl.h"
#include "webkit/glue/webkit_glue.h"
@@ -296,4 +298,14 @@ WebBlobRegistry* WorkerWebKitPlatformSupportImpl::blobRegistry() {
return blob_registry_.get();
}
+void WorkerWebKitPlatformSupportImpl::queryStorageUsageAndQuota(
+ const WebKit::WebURL& storage_partition,
+ WebKit::WebStorageQuotaType type,
+ WebKit::WebStorageQuotaCallbacks* callbacks) {
+ ChildThread::current()->quota_dispatcher()->QueryStorageUsageAndQuota(
+ storage_partition,
+ static_cast<quota::StorageType>(type),
+ QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks));
+}
+
} // namespace content
diff --git a/content/worker/worker_webkitplatformsupport_impl.h b/content/worker/worker_webkitplatformsupport_impl.h
index aa193a1..b923ba3 100644
--- a/content/worker/worker_webkitplatformsupport_impl.h
+++ b/content/worker/worker_webkitplatformsupport_impl.h
@@ -99,6 +99,10 @@ class WorkerWebKitPlatformSupportImpl : public WebKitPlatformSupportImpl,
virtual WebKit::WebString mimeTypeFromFile(const WebKit::WebString&);
virtual WebKit::WebString preferredExtensionForMIMEType(
const WebKit::WebString&);
+ virtual void queryStorageUsageAndQuota(
+ const WebKit::WebURL& storage_partition,
+ WebKit::WebStorageQuotaType,
+ WebKit::WebStorageQuotaCallbacks*) OVERRIDE;
private: