Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(555)

Unified Diff: content/common/child_thread.cc

Issue 8747002: Dispatch IndexedDB IPC messages to worker threads (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: repurpose obsolete indexed-db switch to control idb on workers Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/common/child_thread.cc
diff --git a/content/common/child_thread.cc b/content/common/child_thread.cc
index 9988e279310ece37cce4ce15daf488afe473e735..7de83cd4c528d0e6d3da444c282186c1122cc415 100644
--- a/content/common/child_thread.cc
+++ b/content/common/child_thread.cc
@@ -14,9 +14,11 @@
#include "content/common/child_process_messages.h"
#include "content/common/child_trace_message_filter.h"
#include "content/common/file_system/file_system_dispatcher.h"
+#include "content/common/indexed_db_message_filter.h"
#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 "ipc/ipc_logging.h"
#include "ipc/ipc_sync_channel.h"
@@ -60,6 +62,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_.get());
}
ChildThread::~ChildThread() {
@@ -270,3 +278,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_.get();
+}

Powered by Google App Engine
This is Rietveld 408576698