summaryrefslogtreecommitdiffstats
path: root/chrome/common/child_thread.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-12 21:42:52 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-12 21:42:52 +0000
commiteb9989097eb86b7cc6e535a1d69112b3a38a02c0 (patch)
treec9918e47c10ae09ca9d0f82928075624b10c9c2a /chrome/common/child_thread.cc
parent3e896efc285b9656fab36fa855d796b16634bd94 (diff)
downloadchromium_src-eb9989097eb86b7cc6e535a1d69112b3a38a02c0.zip
chromium_src-eb9989097eb86b7cc6e535a1d69112b3a38a02c0.tar.gz
chromium_src-eb9989097eb86b7cc6e535a1d69112b3a38a02c0.tar.bz2
Switch to using one ResourceDispatcher per render process, and move it to ChildThread so that the same code is used by the plugin process (and soon, workers).
Review URL: http://codereview.chromium.org/42108 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11581 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/child_thread.cc')
-rw-r--r--chrome/common/child_thread.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/common/child_thread.cc b/chrome/common/child_thread.cc
index 7a6e39c..237e53c 100644
--- a/chrome/common/child_thread.cc
+++ b/chrome/common/child_thread.cc
@@ -62,6 +62,10 @@ void ChildThread::RemoveRoute(int32 routing_id) {
}
void ChildThread::OnMessageReceived(const IPC::Message& msg) {
+ // Resource responses are sent to the resource dispatcher.
+ if (resource_dispatcher_->OnMessageReceived(msg))
+ return;
+
if (msg.routing_id() == MSG_ROUTING_CONTROL) {
OnControlMessageReceived(msg);
} else {
@@ -80,6 +84,8 @@ void ChildThread::Init() {
#ifdef IPC_MESSAGE_LOG_ENABLED
IPC::Logging::current()->SetIPCSender(this);
#endif
+
+ resource_dispatcher_.reset(new ResourceDispatcher(this));
}
void ChildThread::CleanUp() {
@@ -89,4 +95,5 @@ void ChildThread::CleanUp() {
// Need to destruct the SyncChannel to the browser before we go away because
// it caches a pointer to this thread.
channel_.reset();
+ resource_dispatcher_.reset();
}