summaryrefslogtreecommitdiffstats
path: root/chrome/profile_import
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/profile_import
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/profile_import')
-rw-r--r--chrome/profile_import/profile_import_thread.cc5
-rw-r--r--chrome/profile_import/profile_import_thread.h2
2 files changed, 5 insertions, 2 deletions
diff --git a/chrome/profile_import/profile_import_thread.cc b/chrome/profile_import/profile_import_thread.cc
index 2368573..f7a665b 100644
--- a/chrome/profile_import/profile_import_thread.cc
+++ b/chrome/profile_import/profile_import_thread.cc
@@ -34,7 +34,8 @@ ProfileImportThread::ProfileImportThread()
ProfileImportThread::~ProfileImportThread() {}
-void ProfileImportThread::OnControlMessageReceived(const IPC::Message& msg) {
+bool ProfileImportThread::OnControlMessageReceived(const IPC::Message& msg) {
+ bool handled = true;
IPC_BEGIN_MESSAGE_MAP(ProfileImportThread, msg)
IPC_MESSAGE_HANDLER(ProfileImportProcessMsg_StartImport,
OnImportStart)
@@ -42,7 +43,9 @@ void ProfileImportThread::OnControlMessageReceived(const IPC::Message& msg) {
OnImportCancel)
IPC_MESSAGE_HANDLER(ProfileImportProcessMsg_ReportImportItemFinished,
OnImportItemFinished)
+ IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
+ return handled;
}
void ProfileImportThread::OnImportStart(
diff --git a/chrome/profile_import/profile_import_thread.h b/chrome/profile_import/profile_import_thread.h
index 079fa4c..0c86885 100644
--- a/chrome/profile_import/profile_import_thread.h
+++ b/chrome/profile_import/profile_import_thread.h
@@ -56,7 +56,7 @@ class ProfileImportThread : public ChildThread {
private:
// IPC messages
- virtual void OnControlMessageReceived(const IPC::Message& msg);
+ virtual bool OnControlMessageReceived(const IPC::Message& msg);
// Creates the importer and launches it in a new thread. Import is run on
// a separate thread so that this thread can receive messages from the