Index: chrome/browser/extensions/extension_message_service.cc |
diff --git a/chrome/browser/extensions/extension_message_service.cc b/chrome/browser/extensions/extension_message_service.cc |
index f3fb6a0a4088465c6bcc4979dfcf8643b902dd7f..2c7f693eb2f4d2e64b05582d7c12ace681624ea2 100644 |
--- a/chrome/browser/extensions/extension_message_service.cc |
+++ b/chrome/browser/extensions/extension_message_service.cc |
@@ -177,6 +177,12 @@ void ExtensionMessageService::RemoveEventListener(const std::string& event_name, |
} |
} |
+bool ExtensionMessageService::HasEventListener( |
+ const std::string& event_name) { |
+ return (listeners_.find(event_name) != listeners_.end() && |
+ !listeners_[event_name].empty()); |
+} |
+ |
void ExtensionMessageService::AllocatePortIdPair(int* port1, int* port2) { |
AutoLock lock(next_port_id_lock_); |