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

Unified Diff: chrome/common/child_thread.cc

Issue 5978003: Make IPC::Channel::Listener:OnMessageReceived have a return value indicating ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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
« no previous file with comments | « chrome/common/child_thread.h ('k') | chrome/common/file_system/file_system_dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/child_thread.cc
===================================================================
--- chrome/common/child_thread.cc (revision 70108)
+++ chrome/common/child_thread.cc (working copy)
@@ -139,14 +139,14 @@
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 @@
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() {
« no previous file with comments | « chrome/common/child_thread.h ('k') | chrome/common/file_system/file_system_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698