Index: content/worker/worker_webkitplatformsupport_impl.cc |
diff --git a/content/worker/worker_webkitplatformsupport_impl.cc b/content/worker/worker_webkitplatformsupport_impl.cc |
index 9832a42c9b1c8bbf15757a3d3cf7fc878b0f4d74..50328c43b00b8019d9441d8b0e2ae77f2bcb88bc 100644 |
--- a/content/worker/worker_webkitplatformsupport_impl.cc |
+++ b/content/worker/worker_webkitplatformsupport_impl.cc |
@@ -13,6 +13,7 @@ |
#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/quota_message_filter.h" |
#include "content/child/thread_safe_sender.h" |
#include "content/child/webblobregistry_impl.h" |
#include "content/child/webmessageportchannel_impl.h" |
@@ -76,10 +77,12 @@ bool WorkerWebKitPlatformSupportImpl::FileUtilities::getFileInfo( |
WorkerWebKitPlatformSupportImpl::WorkerWebKitPlatformSupportImpl( |
ThreadSafeSender* sender, |
- IPC::SyncMessageFilter* sync_message_filter) |
+ IPC::SyncMessageFilter* sync_message_filter, |
+ QuotaMessageFilter* quota_message_filter) |
: thread_safe_sender_(sender), |
child_thread_loop_(base::MessageLoopProxy::current()), |
- sync_message_filter_(sync_message_filter) { |
+ sync_message_filter_(sync_message_filter), |
+ quota_message_filter_(quota_message_filter) { |
} |
WorkerWebKitPlatformSupportImpl::~WorkerWebKitPlatformSupportImpl() { |
@@ -302,10 +305,14 @@ 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)); |
+ if (!thread_safe_sender_.get() || !quota_message_filter_.get()) |
+ return; |
+ QuotaDispatcher::ThreadSpecificInstance( |
+ thread_safe_sender_.get(), |
+ quota_message_filter_.get())->QueryStorageUsageAndQuota( |
+ storage_partition, |
+ static_cast<quota::StorageType>(type), |
+ QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); |
} |
} // namespace content |