Index: content/common/child_thread.cc |
diff --git a/content/common/child_thread.cc b/content/common/child_thread.cc |
index 93e7e143445b59f8244b63bd8d0f5adfbfdb6e85..79782abe605b578219749060fe607b72b4b7d807 100644 |
--- a/content/common/child_thread.cc |
+++ b/content/common/child_thread.cc |
@@ -14,7 +14,9 @@ |
#include "content/common/quota_dispatcher.h" |
#include "content/common/resource_dispatcher.h" |
#include "content/common/socket_stream_dispatcher.h" |
+#include "content/common/worker_task_runner.h" |
#include "content/public/common/content_switches.h" |
+#include "content/renderer/indexed_db_message_filter.h" |
#include "ipc/ipc_logging.h" |
#include "ipc/ipc_sync_channel.h" |
#include "ipc/ipc_sync_message_filter.h" |
@@ -57,6 +59,12 @@ void ChildThread::Init() { |
new IPC::SyncMessageFilter(ChildProcess::current()->GetShutDownEvent()); |
channel_->AddFilter(sync_message_filter_.get()); |
channel_->AddFilter(new ChildTraceMessageFilter()); |
+ |
+ idb_message_filter_ = new IndexedDBMessageFilter; |
+ channel_->AddFilter(idb_message_filter_.get()); |
+ |
+ worker_task_runner_ = new WorkerTaskRunner; |
+ worker_task_runner_->AddObserver(idb_message_filter_); |
} |
ChildThread::~ChildThread() { |
@@ -247,3 +255,11 @@ void ChildThread::OnProcessFinalRelease() { |
// The browser then sends back a response if it's ok to shutdown. |
Send(new ChildProcessHostMsg_ShutdownRequest); |
} |
+ |
+IndexedDBDispatcher* ChildThread::indexed_db_dispatcher() const { |
+ return idb_message_filter_->thread_specific_idb_dispatcher(); |
+} |
+ |
+WorkerTaskRunner* ChildThread::worker_task_runner() const { |
+ return worker_task_runner_; |
+} |