diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-24 06:19:28 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-24 06:19:28 +0000 |
commit | a95986a837fc86e079b5c6dac357636478b50092 (patch) | |
tree | 66a32009250791e64741216cdd6c21ecf1ff7f86 /chrome/browser/nacl_host | |
parent | 125a7ba65ad10ace9edcf36d6943ce9ae2bdc1d6 (diff) | |
download | chromium_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/browser/nacl_host')
-rw-r--r-- | chrome/browser/nacl_host/nacl_broker_host_win.cc | 5 | ||||
-rw-r--r-- | chrome/browser/nacl_host/nacl_broker_host_win.h | 2 | ||||
-rw-r--r-- | chrome/browser/nacl_host/nacl_process_host.cc | 3 | ||||
-rw-r--r-- | chrome/browser/nacl_host/nacl_process_host.h | 2 |
4 files changed, 8 insertions, 4 deletions
diff --git a/chrome/browser/nacl_host/nacl_broker_host_win.cc b/chrome/browser/nacl_host/nacl_broker_host_win.cc index 0942a23..7d0fbea 100644 --- a/chrome/browser/nacl_host/nacl_broker_host_win.cc +++ b/chrome/browser/nacl_host/nacl_broker_host_win.cc @@ -46,10 +46,13 @@ bool NaClBrokerHost::Init() { return true; } -void NaClBrokerHost::OnMessageReceived(const IPC::Message& msg) { +bool NaClBrokerHost::OnMessageReceived(const IPC::Message& msg) { + bool handled = true; IPC_BEGIN_MESSAGE_MAP(NaClBrokerHost, msg) IPC_MESSAGE_HANDLER(NaClProcessMsg_LoaderLaunched, OnLoaderLaunched) + IPC_MESSAGE_UNHANDLED(handled = false) IPC_END_MESSAGE_MAP() + return handled; } bool NaClBrokerHost::LaunchLoader( diff --git a/chrome/browser/nacl_host/nacl_broker_host_win.h b/chrome/browser/nacl_host/nacl_broker_host_win.h index 7213ff0..27ceb24 100644 --- a/chrome/browser/nacl_host/nacl_broker_host_win.h +++ b/chrome/browser/nacl_host/nacl_broker_host_win.h @@ -33,7 +33,7 @@ class NaClBrokerHost : public BrowserChildProcessHost { base::ProcessHandle handle); // IPC::Channel::Listener - virtual void OnMessageReceived(const IPC::Message& msg); + virtual bool OnMessageReceived(const IPC::Message& msg); bool stopping_; diff --git a/chrome/browser/nacl_host/nacl_process_host.cc b/chrome/browser/nacl_host/nacl_process_host.cc index f9f5667..a009702 100644 --- a/chrome/browser/nacl_host/nacl_process_host.cc +++ b/chrome/browser/nacl_host/nacl_process_host.cc @@ -282,8 +282,9 @@ void NaClProcessHost::SendStartMessage() { sockets_for_sel_ldr_.clear(); } -void NaClProcessHost::OnMessageReceived(const IPC::Message& msg) { +bool NaClProcessHost::OnMessageReceived(const IPC::Message& msg) { NOTREACHED() << "Invalid message with type = " << msg.type(); + return false; } bool NaClProcessHost::CanShutdown() { diff --git a/chrome/browser/nacl_host/nacl_process_host.h b/chrome/browser/nacl_host/nacl_process_host.h index e2b0c39..c0d5731 100644 --- a/chrome/browser/nacl_host/nacl_process_host.h +++ b/chrome/browser/nacl_host/nacl_process_host.h @@ -32,7 +32,7 @@ class NaClProcessHost : public BrowserChildProcessHost { int socket_count, IPC::Message* reply_msg); - virtual void OnMessageReceived(const IPC::Message& msg); + virtual bool OnMessageReceived(const IPC::Message& msg); void OnProcessLaunchedByBroker(base::ProcessHandle handle); |