summaryrefslogtreecommitdiffstats
path: root/chrome/common/child_thread.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-24 06:19:28 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-24 06:19:28 +0000
commita95986a837fc86e079b5c6dac357636478b50092 (patch)
tree66a32009250791e64741216cdd6c21ecf1ff7f86 /chrome/common/child_thread.cc
parent125a7ba65ad10ace9edcf36d6943ce9ae2bdc1d6 (diff)
downloadchromium_src-a95986a837fc86e079b5c6dac357636478b50092.zip
chromium_src-a95986a837fc86e079b5c6dac357636478b50092.tar.gz
chromium_src-a95986a837fc86e079b5c6dac357636478b50092.tar.bz2
Make IPC::Channel::Listener:OnMessageReceived have a return value indicating whether a message was processed or not.
TBR=brettw Review URL: http://codereview.chromium.org/5978003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70139 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/child_thread.cc')
-rw-r--r--chrome/common/child_thread.cc19
1 files changed, 9 insertions, 10 deletions
diff --git a/chrome/common/child_thread.cc b/chrome/common/child_thread.cc
index 2a46de8..53823bc 100644
--- a/chrome/common/child_thread.cc
+++ b/chrome/common/child_thread.cc
@@ -139,14 +139,14 @@ MessageLoop* ChildThread::message_loop() {
return message_loop_;
}
-void ChildThread::OnMessageReceived(const IPC::Message& msg) {
+bool ChildThread::OnMessageReceived(const IPC::Message& msg) {
// Resource responses are sent to the resource dispatcher.
if (resource_dispatcher_->OnMessageReceived(msg))
- return;
+ return true;
if (socket_stream_dispatcher_->OnMessageReceived(msg))
- return;
+ return true;
if (file_system_dispatcher_->OnMessageReceived(msg))
- return;
+ return true;
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(ChildThread, msg)
@@ -160,13 +160,12 @@ void ChildThread::OnMessageReceived(const IPC::Message& msg) {
IPC_END_MESSAGE_MAP()
if (handled)
- return;
+ return true;
- if (msg.routing_id() == MSG_ROUTING_CONTROL) {
- OnControlMessageReceived(msg);
- } else {
- router_.OnMessageReceived(msg);
- }
+ if (msg.routing_id() == MSG_ROUTING_CONTROL)
+ return OnControlMessageReceived(msg);
+
+ return router_.OnMessageReceived(msg);
}
void ChildThread::OnAskBeforeShutdown() {